#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]<50)
{
count++;
}
}
printf("Number of the student got fail marks %d",count);
return 0;
}
Problem Description
The PDD teacher wants to know number of students got fail mark in CT I if she has a unordered list of marks for 10 students
Test Case 1
Input (stdin)
Thomas 75
Imran 60
Sithik 80
Setan 80
Milton 85
Arjun 42
Rakesh 91
Hrithik 88
Ayush 85
Aswathy 55
Expected Output
Number of the student got fail marks 1
Test Case 2
Input (stdin)
Thomas 75
Imran 60
Sithik 80
Setan 80
Milton 85
Arjun 85
Rakesh 91
Hrithik 88
Ayush 85
Aswathy 55
Expected Output
Number of the student got fail marks 0
No comments:
Post a Comment