Hi there i already got the programming for decimal to hexidecimal.. can someone guide me hw to do hexidecimal to decimal
Hi there i already got the programming for decimal to hexidecimal.. can someone guide me hw to do hexidecimal to decimal
Occasionally? Haha who are you kidding?
Nobody. I just only receive the notification itself occasionally, such as this case. I'm sure the rate of people ignoring me is much higher than that. I just like receiving the confirmation.
[sarcasm]
Huh, did somebody say something...
[/sarcasm]
"guide" you, huh? Well you start telling us where you are stuck.
Last edited by iMalc; 07-09-2007 at 03:16 AM.
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"
A better question is why you haven't coded up two general purpose routines
int stringToInt( char *string, int inBase );
void intToString( char *result, int value, int outBase );
At the moment, you're relying on scanf to achieve
result = stringToInt( "1234", 10 );
I mean, once you understand all the /BASE and %BASE logic, converting to/from any base is a doddle. A couple of functions with some parameters (eg, the base to use) should see you solving all 6 cases in one go, not as you are at the moment hand crafting each solution as a special case.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.