69,335
社区成员
发帖
与我相关
我的任务
分享
[root@bogon temp]# cat t1.c
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
int main()
{
printf("%f\n",10/3);
printf("%f\n",3);
printf("%d\n",10/3);
printf("%f\n",10/3);
printf("%f\n",(double)10/3);
printf("%f\n",10/3);
printf("%f\n",10/3);
}
[root@bogon temp]# ./t1
0.000000
0.000000
3
0.000000
3.333333
3.333332
3.333332
[root@bogon temp]#
printf("the 10.0/3 is %f\n",10.0/3);