Write a C program to read the internal
test marks of 25 students in a class
and
show the number of students who have scored more than
50% in the test.
Make necessary assumptions.
#include<stdio.h>
#include<conio.h>
void
main()
{
clrscr();
int
a[25],i;
printf(“Enter
the marks of 25 students:\n”);
for(i=1;i<=25;i++)
{
scanf(“%d”,&a[i]);
}
for(i=1;i<=25;i++)
{
if(a[i]>50)
printf(“%d
marks are greater than 50%\n”);
}
getch();
}
No comments:
Post a Comment