Sum and Percentage

Sub 1

Sub 2

Sub 3

Sub 4

Sub 5

Max Marks


Code

#include < stdio.h >

int main(){

float subject1, subject2, subject3, subject4, subject5;

float total, maximum-marks, percentage;

printf("Enter the maximum marks \n");

scanf("%f", &maximum-marks);

printf("Enter marks of five subjects: \n");

scanf("%f%f%f%f%f", &subject1, &subject2, &subject3, &subject4, &subject5);

total = subject1 + subject2 + subject3 + subject4 + subject5;

percentage = (total / maximum-marks) * 100;

printf("Total marks = %.2f\n", total);

printf("Percentage = %.2f", percentage);

return 0;}

Memory

 

Subject 1

 

Subject 2

 

Subject 3

 

Subject 4

 

Subject 5

 

Total Marks

 

Percentage