# c program to count no. of students who scored more than 50%

The logic to write a c program to count no. of students who scored more than 50%  of marks is: Store student marks in an array initialize count variable as zero. for each student calculate percentage if it is greater than 50% increment count

## c program to count no. of students who scored more than 50% of marks

Write a c program to count no. of students who scored more than 50% of marks

# include <stdio.h>
# define Total_marks=100
main()
{
struct student
{
int marks;
}
student s1[5];
int i count =0;
printf(“To count no. of students who scored more than 50% of marks “)
for(i=0;i<25;i++)
{
printf(“\n Enter the marks of %d   :\n”,  s1[” i “]  );

scanf(“%d”,&s1[5]);
if (s1[i]>=(Total_marks/2))
count=count+1;
}
printf(“no. of students secured more than 50% is: %d \n”, count)
}

OUTPUT:

..To count no. of students who scored more than 50% of marks…

Enter the marks of s1[0]:
56
Enter the marks of s1[1]:
89
Enter the marks of s1[2:
34
Enter the marks of s1[3]:
98
Enter the marks of s1[4]:
32
no. of students secured more than 50% is: 3