Question Name:Less Mark in List

#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

Leave a Reply

Your email address will not be published. Required fields are marked *

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.