读取一个单精度浮点数并输出它(保留小数点后3位) | ||
Sample Input | ||
1.23 | ||
Sample Output | ||
1.230 |
#include<stdio.h>
int main()
{
float n;
scanf("%f",&n);
printf("%.3f",n);
return 0;
}
读取一个单精度浮点数并输出它(保留小数点后3位) | ||
Sample Input | ||
1.23 | ||
Sample Output | ||
1.230 |
#include<stdio.h>
int main()
{
float n;
scanf("%f",&n);
printf("%.3f",n);
return 0;
}