Program 12.33 A class of 35 students takes an examination in which marks range from 0 to 100. We a program which finds: a) The average marks b) The number of students failed (marks below 50) c) The number of students who scored 100 marks
#include<stdio.h>
void main()
{
int fail,full,marks,total,c;
float avg=0.0;
fail=full=total=0;
for(c=1;c<=35;c++)
{
print("Enter marks:");
scanf("%d",marks);
tatal=total+marks;
if(marks<50)
fail++;
if(marks==100)
full++;
}
avg=total/35.0;
printf("Average marks:%.2f\n",avg);
printf ("Failed student:%d\n,fail);
printf ("students who scored 100:%d\n",fail);
}
Answers
Answered by
0
Answer:
Hi ha dos tipus diferents de mitjans per a un feliç i a la vostra família i amics els encanta fer amb el matí perquè tingueu a vosaltres i jo sóc molt
Similar questions