收起
#include <stdio.h> int main() { float a = 0.5; printf("%f,%0.2f\n",a,a); } 输出: 0.500000,0.50
输出都是自己控制的,默认是6位。如果觉得可以请采纳一下吧。
报告相同问题?