#include<stdio.h>
#include<conio.h>
{
int n,i,c=0,cf=0;
float m[100];
clrscr();
printf("\nEnter how many students?");
scanf("%d",&n);
printf("\n Enter marks for %d students: ",n);
for(i=0;i<n;i++)
scanf("%f",&m[i]);
for(i=0;i<n;i++)
if(m[i]>70)
c=c+1;
else if(m[i]<35)
cf=cf+1;
printf("\n Total no. of students scoring more than 70 are %d ",c);
printf("\nTotal no. of students who are fail are %d ",cf);
getch();
}
No comments:
Post a Comment
Rahul-Notes