Type the Question

Saturday, February 16, 2019

Question Name:Mark Range

#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

Question Name:TOWER OF HANOI

#include < bits / stdc ++. h > #define lli long long using namespace std ; lli dp [ 202 ]; int main () { int t , n ; ...