#include<stdio.h>
int main(void)
{
float c;
printf(" pls key in your code:");
scanf("%f",&c);
printf("the output is %f or %e",c,c);
system("pause");
return 0;
}
after I have compiled the code above, I typed in 21.29, and what I get is "the output is 21.290001 or 2.129000e+001", why I got the different figure here? Any suggestion? thanks.
int main(void)
{
float c;
printf(" pls key in your code:");
scanf("%f",&c);
printf("the output is %f or %e",c,c);
system("pause");
return 0;
}
after I have compiled the code above, I typed in 21.29, and what I get is "the output is 21.290001 or 2.129000e+001", why I got the different figure here? Any suggestion? thanks.