✔ 最佳答案
#include "stdafx.h"
#include "stdlib.h"
#include "stdio.h"
int _tmain(int argc, _TCHAR* argv[])
{
float a = 0.0, b = 0.0, c = 0.0, total = 0.0, average = 0.0;
printf("Enter a = \n");
scanf("%f",&a);
printf("Enter b = \n");
scanf("%f",&b);
printf("Enter c = \n");
scanf("%f",&c);
total = a + b + c;
average = (a + b + c) / 3;
printf("a + b + c = %6.2f \n", total);
printf("(a + b + c) / 3 = %6.2f \n", average);
system("Pause");
return 0;
}