int integer = 123;
itox (int integer)
{
while (integer > 0)
{
int temp = integer %16;
if (temp < 0)
break;
itox (integer /16);
if (temp >= 0 && temp <= 9)
printf(“%d”, temp);
else if (temp >= 10 && temp <= 15)
printf(“%c”, ‘A’ + temp – 10);
else
;//nothing to do
}
}
Friday, March 26, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment