vim average_3_numbers.c
#include <stdio.h>
int main()
{
int a, b, c, sum;
float d;
printf("Please enter 3 numbers:");
scanf("%d%d%d", &a, &b, &c);
sum = a + b + c;
d = sum / 3;
printf("Sum is %d\n", sum);
printf("Average is %f\n", d);
}
恕我直言:这道题”经典“在哪里了?。。。