求N个学生成绩中的最高分

#include <stdio.h>
void main()
{
int i = 0, score = 0,max = 0;

for(; i < 10; i++)
{
printf("请输入第%d个学生的成绩:",i+1);
scanf("%d",&score);
if(max < score)
{
max = score;
}

}

printf("最高分是:%d\n",max);
}

posted on 2014-10-07 21:03  Aaron_He  阅读(378)  评论(0编辑  收藏  举报