To calculate average and percentage marks (in 5 subjects) of a student in C++ programming, you have to ask from user to enter marks obtained in 5 subjects. Now place the summation result of 5 subject’s mark in a variable say sum and place sum/5 in a variable say avg (average of 5 subjects).
How do you find the average of marks in C++?
To calculate average and percentage marks (in 5 subjects) of a student in C++ programming, you have to ask from user to enter marks obtained in 5 subjects. Now place the summation result of 5 subject’s mark in a variable say sum and place sum/5 in a variable say avg (average of 5 subjects).