C语言f格式符
C语言f格式符
日期:2022-03-30 02:54:45 人气:1
float占用字节数4,有效数字6~7,数值范围-3.4*10^38
~3.4*10^38
printf("%.3f\n",123.45)
123.450
printf("%.1f\n",123.45)
123.5
printf("%.0f\n",123.45)
123
~3.4*10^38
printf("%.3f\n",123.45)
123.450
printf("%.1f\n",123.45)
123.5
printf("%.0f\n",123.45)
123