附加题1:求整数均值
#include<stdio.h> int main() { int i; double average,sum=0; int a[4]; printf("请输入四个数:"); for(i=0;i<4;i++){ scanf("%d",&a[i]); sum=sum+a[i]; } average=sum/4; printf("average=%.1f ",average); printf("sum=%.1f ",sum); return 0; }