Project 19: Class scores Write a program that calculates the total grade for N c
ID: 3639327 • Letter: P
Question
Project 19: Class scores Write a program that calculates the total grade for N classroom exercises as a percentage. The user should input the value for N followed by each of the N scores and totals. Calculate the overall percentage (sum of the total points earned divided by the total points possible) and output it as a percentage. sample input (in bold) and output (in italics) is shown below.How many exercises to input?
Explanation / Answer
#include using namespace std; int main () { int n=0,n_initial; // n will be the number of assignments entered in the system. // since n will be counting down, I want to save n_initial as well. // # OF EXERCISES cout > n; n_initial = n; int grades [2][n]; // 2 rows for possible and actual, n columns because you will have a column for each item. //SCORE RECIEVED COUNTDOWN while (n>0) { int x,y; coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.