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