就是打印格式--- .2f #include<stdio.h> int main() { float a,b,c; scanf("%f %f %f",&a,&b,&c); printf("%.2f %.2f",a+b+c,(a+b+c)/3.0); return 0; }