单精度实型用float表示,32位,精度6位;
双精度实型用double表示,64位,精度15位,在精度要求高或者数值相差悬殊时用double。
#include "stdio.h"
void main()
{
float x=400.0/3;
double y=400.0/3;
printf("%.6f %.6lf\n",x,y);
x=1234567+0.01;
y=1234567+0.01;
printf("%.2f %.2lf\n",x,y);
}