当先锋百科网

首页 1 2 3 4 5 6 7

00e27ab806e4881f8254fe7ae8741834.png

lanwuage95

2013.09.11

00e27ab806e4881f8254fe7ae8741834.png

采纳率:54%    等级:12

已帮助:12774人

我写了一个你看咱样行不:

#include

#include

main()

{

int i,min,sum=0, pingjun, a[6]={75,80,83,85,86,30};

char *b="数学";//,"物理","外语","政治","体育","人数"};

system("color a");

printf("原始信息如下:\n");

printf("数学:%d\n",a[0]);

printf("物理:%d\n",a[1]);

printf("外语:%d\n",a[2]);

printf("政治:%d\n",a[3]);

printf("体育:%d\n",a[4]);

printf("人数:%d\n",a[5]);

printf("总平均成绩:\n");

printf("最低分数科目的成绩:\n");

printf("最低分数科目:\n\n");

printf("全班各科平均成绩如下:\n");

printf("数学:%d\n",a[0]);

printf("物理:%d\n",a[1]);

printf("外语:%d\n",a[2]);

printf("政治:%d\n",a[3]);

printf("体育:%d\n",a[4]);

printf("统计结果如下:\n");

printf("人数:%d\n",a[5]);

for(i=0;i<5;i++)

sum+=a[i];

pingjun=sum/5;

printf("总平均成绩:%d\n",pingjun);

for(i=1;i<5;i++)

if(a[0]

min=a[0];

else

min=a[i];

printf("最低分数科目的成绩:%d\n",min);

printf("最低分数科目:%s\n",b);

}

00分享举报