Hello,
Check out the following code
Code:
int hand()
{
int chc=0;
double num=0, nombreConverti=0;
chariot ky=0;
printf("Welcome to the decimal-binary converter!\ N \ N");
printf("1.Conversion decimal-binary\ N");
printf("Binary-decimal 2.Conversion\ N \ N");
printf("What is your chc?\ N");
scanf("% D", &chc);
printf("\ NWhat num do you convert?\ N");
scanf("% Lf", &num);
if (chc==1)
{
nombreConverti=convDecBin(num);
printf("\ NThe conversion of% d in binary is% f\ N", (int)num, (float)nombreConverti);/ / Pb with the float!
}
else
{
/ / ConvBinDec (num);
}
printf("\ N \ NPress any ky to terminate\ N");
scanf("% C", &ky);
return 0;
}
Bookmarks