Write a c program for Calculation of aggregate and percentage marks

5 (100%) 3 votes
c program for calculation of aggregate and percentage marks
c program for calculation of aggregate and percentage marks

Problem Statement:

If the marks obtained by a student in five different subjects are input through the keyboard, find out the aggregate marks and percentage marks obtained by the student. Assume that the maximum marks that can be obtained by a student in each subject is 100.

Answer:

/* Calculation of aggregate and percentage marks */

#include<stdio.h>
#include<conio.h>

main()
{
int m1, m2, m3, m4, m5, aggr;
float per;

clrscr();
printf(“\n Enter marks in 5 subjects:”);
scanf(“%d %d %d %d %d”, &m1, &m2, &m3, &m4, &m5);

aggr=m1+m2+m3+m4+m5;
per=aggr/5;

printf(“\n Aggregate Marks=%d”,aggr);
printf(“\n Percentage Marks=%d”,per);

printf(“\n\n\n\n\n Press any key to exit….”);
getch();
}

Please run this program and share the output with us.

 

For any query or issue, feel free to discuss on http://discuss.eduguru.in

Satya Prakash

VOIP Expert: More than 8 years of experience in Asterisk Development and Call Center operation Management. Unique Combination of Skill Set as IT, Analytics and operation management.

Leave a Reply

%d bloggers like this: