a simple problem about printf("%10.5f",f)
- From: "Jude" <jalleryan@xxxxxxxxxxx>
- Date: 16 Feb 2006 23:21:51 -0800
here is the source code:
#include<stdio.h>
int main()
{
float f;
scanf("%f",&f);
printf("The float is %10.5f\n",f);
return 0;
}
when I input 12345.11111,the output is 12345.11133.
what's wrong with it?
I compile it with vc++6.0.
.
- Follow-Ups:
- Re: a simple problem about printf("%10.5f",f)
- From: Joe Wright
- Re: a simple problem about printf("%10.5f",f)
- From: Keith Thompson
- Re: a simple problem about printf("%10.5f",f)
- Prev by Date: Re: Cannot explain why the date is changed to 1792.
- Next by Date: Should I include this <stddef.h> ?
- Previous by thread: a simple problem about printf("%f",f)
- Next by thread: Re: a simple problem about printf("%10.5f",f)
- Index(es):
Relevant Pages
|