#include <stdio.h>
int main()
{
int a[10],count=0,i;
char k[10];
for(i=0;i<10;i++)
{
scanf("%s",k);
scanf("%d",&a[i]);
if(a[i]>=80 && a[i]<=100)
{
count++;
}
}
printf("Number of the student got 80-100 marks %d",count);
return 0;
}
Problem Description
The
Maths teacher wants to know the number of student with pass mark range
from 80-100 in CT I if she has a unordered list of marks for 10 students
Test Case 1
Input (stdin)
Thomas 75
Imran 60
Sithik 95
Setan 80
Milton 40
Arjun 90
Rakesh 91
Hrithik 88
Ayush 72
Aswathy 96
Expected Output
Number of the student got 80-100 marks 6
Test Case 2
Input (stdin)
Thomas 75
Imran 60
Sithik 95
Setan 42
Milton 40
Arjun 90
Rakesh 91
Hrithik 45
Ayush 72
Aswathy 96
Expected Output
Number of the student got 80-100 marks 4
No comments:
Post a Comment