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.
#include<stdio.h>
#include<conio.h>
void main(void)
{
int maths, phy, chem, eng, urdu, aggr;
float per;
printf("Enter Marks for Maths, Physics, Chemistry, English and Urdu respectively: ");
scanf("%d%d%d%d%d", &maths, &phy, &chem, &eng, &urdu );
aggr = maths + phy + chem + eng + urdu ;
per= aggr*100.0/500.0;
printf("\nAggregate Marks are %d", aggr);
printf("\nPercentage of the Marks is %f", per);
getch();
}
#include<stdio.h>
#include<conio.h>
void main(void)
{
int maths, phy, chem, eng, urdu, aggr;
float per;
printf("Enter Marks for Maths, Physics, Chemistry, English and Urdu respectively: ");
scanf("%d%d%d%d%d", &maths, &phy, &chem, &eng, &urdu );
aggr = maths + phy + chem + eng + urdu ;
per= aggr*100.0/500.0;
printf("\nAggregate Marks are %d", aggr);
printf("\nPercentage of the Marks is %f", per);
getch();
}
Great Blog I Have Read Your Blog It Is Very Useful For Me Thank you for Posting And sharing such great information.can you help me in finding out more detail on final year projects on java.
ReplyDelete