Draw a flowchart for algorithm that will obtain 10 exam scores from the user and determine whether the score is passing (a score of 60 or above) or failing. Your algorithm should count the number of passing and failing scores. Output the average of the scores, the number of failing scores, and the number of passing scores must be reflected in the flowchart.
Answers
Answered by
3
Answer:
#include<stdio.h>
int main ()
{
float a,b=0;
int o=0,x=0;
printf("Enter 10 marks:");
for(int p=0; p<10;p++){
scanf("%f",&a);
b += a;
if ( a>=60)
o+=1;
else
x+=1;
}
printf("Average=%f",b/10);
printf("\nNumber of passing:%d\nNumber of failing:%d",o,x);
return 0;
}
Similar questions