#include<stdio.h>
intmain()
{
floata,b,c;
printf(“输入3个浮点数,以空格隔开:\n”);
scanf(“%f%f%f”,&a,&b,&c);
printf(“平均值为:%.2f”,(a+b+c)/3);
return0;
}
时间:2020-10-24 20:07:19
#include<stdio.h>
intmain()
{
floata,b,c;
printf(“输入3个浮点数,以空格隔开:\n”);
scanf(“%f%f%f”,&a,&b,&c);
printf(“平均值为:%.2f”,(a+b+c)/3);
return0;
}