浮点数保存带小数点的值。以下代码是浮点值的示例:
#include <stdio.h>
int main(void)
{
float f = 1.5;
printf("%f/n",f);
f = 0.00008;
printf("%f/n",f);
f = 100.0;
printf("%f/n",f);
return 0;
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/266681.html