Percentage = ( sum * 100 ) / tmp printf(“nPercentage Of Student : %dn”, Percentage) here tmp. Logic to find total, average and percentage · Input marks of five subjects. · Calculate sum of all subjects and store in total = eng + phy + chem. 4.Calculate percentage using percentage = (average / 500) * 100. 5.Finally, print resultant values total, average and percentage.Algorithm to calculate Average and Percentage · First Received marks of each subject. · Calculate sum of all subjects marks. · Divide total marks by number of. You divide by 0. num is the variable you use for input. For unknown reason you divide with it in the end. You have a counter for how many.

View this answer now! It’s completely free.

## how to calculate percentage in c++

You divide by 0. num is the variable you use for input. For unknown reason you divide with it in the end. You have a counter for how many. 35 : C Program to Calculate total marks and Percentage · Variables : We have six integer variables for subjects English, French, Algebra, Geometry, History and. Calculate percentage using percentage = (total / 500) * 100. Finally, print resultant values total , average and percentage. C Program to. To find percentage, divide the total scores with the marks obtained and then multiply the result with 100. Formula to Find Percentage of Marks: Percentage of. C program to calculate total average and percentage of five subjects · 1.Input marks of five subjects. · 2.Calculate sum of all subjects and store in total = eng.

## c program to calculate sum of 5 subjects and find percentage and grade

Divide sum of all subjects by total number of subject to find average i.e. average = total / 5. Calculate percentage using percentage = (total. Example. Here we will create a program in which user enter the marks of five subjects and calculate percentage. And you will learn how to find percentage of. OUTPUT: Enter Marks of 5 Subjects: 80 70 85 83 90 Sum of 5 Subjects is: 408 Percentage is: 81.000000. Author: sk.shahida. C Program to calculate sum of 5 subjects and find percentage · main() { · int s1, s2, s3, s4, s5, sum, total = 500 · float per · printf(“nEnter. Write a Program in c to calculate sum of 5 subjects and find percentage float avg printf(” Enter the marks of five subjects : “) scanf(“%d %d %d %d %d ” sum.