如果我对于身高的输出不希望它是6位小数%f应该怎么修改
printf("%.9f %.9lf",0.000000123,0.000000123);输出0.000000123 0.000000123。注意指定精度,否则printf默认精确到小数点后六位
printf("%.9f %.9lf",0.000000123,0.000000123);
你可以在百分号后加.*(*指你希望有几位小数,比如说.2f)