#include
int main()
{
float a[10];
int id = 0;
int cnt = 0;
int i;
for(i = 0; i < 10; i ++)
{
scanf("%f",&a[i]);
if(a[i]>a[id]) id = i;
if(a[i]<60) cnt ++;
}
printf("最高分序号:%d, 分数 %f\n不及格人数:%d\n", id, a[id], cnt);
return 0;
}
#include
typedef struct Student{
int sn;
int score;
}stu;
int main(){
int i,max,fail_number;
fail_number = 0;
stu class[10];
for (i = 0; i <10; i++)
scanf("%d", &class[i].score);
max = 0;
for (i = 0; i < 10;i++)
{
max = (class[max].score < class[i].score)?i:max;
if (class[i].score < 60)
fail_number++;
}
printf("The highest score is %d and the student number is %d\n",class[max].score,max);
printf("Failed students number is %d\n",fail_number);