Question Name:Linear 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 pass marks %d",count);
 return 0;
}

Problem Description

The DS Faculty wants to know number of students got pass 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 25
    Rakesh 91
    Hrithik 88
    Ayush 45
    Aswathy 55
    

    Expected Output

    Number of the student got pass marks 8
  • Test Case 2

    Input (stdin)

    Thomas 75
    Imran 60
    Sithik 80
    Setan 80
    Milton 85
    Arjun 55
    Rakesh 91
    Hrithik 88
    Ayush 85
    Aswathy 55
    

    Expected Output

    Number of the student got pass marks 10

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.

Powered By
CHP Adblock Detector Plugin | Codehelppro