标签:stdio.h amp nbsp style average std ima bsp color
附加题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\n",average); printf("sum=%.1f\n",sum); return 0; }
标签:stdio.h amp nbsp style average std ima bsp color
原文地址:http://www.cnblogs.com/cs-16-4-zlt/p/6067798.html