读入一个单精度浮点数,保留3位小数输出这个浮点数。
12.34521
12.345
#include<stdio.h> int main() { double a; scanf("%lf",&a); printf("%.3lf",a); return 0; }