Well, for starters, you want to put your code inside the [ CODE ] blocks. It preserves the formatting.
Looking at your code isn't as much fun without indentation.
And... and... you have used GOTO. And you have sinned.
Just kidding. (But you may want to look into ways around that.)
I would break the code down into functions to make it more modular and also easier (MUCH EASIER) to read.
Before we go any farther, I will give you an out. Everything you want to do CAN be done using cout and cin and the dec, oct, & hex modifiers. And also scanf with
the x modifier will work.
Now, to get you started, I want you to look at this:
a[i]=a[i]-48; That works for numbers. And only numbers. If you want to add hexadecimal, you need to look beyond numbers.
Try this.
if(a[i]>='0'&&a[i]<='9'){ //Only use this conversion for numbers
a[i]=a[i]-48;
}else if(a[i]>='A'&&a[i]<='F'){ //Only use for upper case letters
a[i]=a[i]-64;
}else if(a[i]>='a'&&a[i]<='f'){ //Only use for upper case letters
a[i]=a[i]-96;
}
More to follow.