Mark Range

QUESTION

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

ANSWER

#include <stdio.h>
int main()
{
  int i,c=0;
  struct mark
  {
    char name[20];
    int m;
  }s[10];
  for(i=1;i<=10;i++)
  {
    scanf("%s %d",s[i].name,&s[i].m);
    if(s[i].m>79 && s[i].m<101)
      c++;
  }
  printf("Number of the student got 80-100 marks %d",c);
	return 0;
}
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
100% Free SEO Tools - Tool Kits PRO