WARNING... untested code....
Since you are inputting integers, there's no reason to fool with doubles...



void itob(int n,char s[],int b)
{ char digits[] = {"0123456789ABCDEF"};
int i...