/ Undifined / 1 - WAP that accepts the marks of 5 subjects and finds the sum and percentage marks obtained by the student.

1 - WAP that accepts the marks of 5 subjects and finds the sum and percentage marks obtained by the student.

WAP that accepts the marks of 5 subjects and finds the sum and percentage marks obtained by the student.

#include<stdio.h>
int main() { int s1, s2, s3, s4, s5, sum, total = 500; float per;
printf("\nEnter marks of 5 subjects : "); scanf("%d %d %d %d %d", &s1, &s2, &s3, &s4, &s5);
sum = s1 + s2 + s3 + s4 + s5; printf("\nSum : %d", sum);
per = (sum * 100) / total; printf("\nPercentage : %f", per);
return (0);}



Output
Enter marks of 5 subjects : 80 70 90 80 80Sum : 400Percentage : 80.00

about author

Blogger Sens it website about blogger templates and blogger widgets you can find us on social media
Previous Post :Go to tne previous Post
Next Post:Go to tne Next Post

No comments:

Post a Comment