Can someone answer this question i will give a lifersaver rating. Write a progra
ID: 3545676 • Letter: C
Question
Can someone answer this question i will give a lifersaver rating.
Write a program that outputs a histogram of grades for an assignment given to
a class of students. The program should input each student
Explanation / Answer
#include #include #include #include using namespace std; const int SIZE = 100; int main() { //Create pointer int *p; //Variable declaration int max = 0; int inputVal; p = new int[SIZE]; vector values; for(int i = 0; i inputVal; values.push_back(inputVal); //Compare input value with Max value if(inputVal > max) //assign input value to maximum value max = inputVal; if(inputVal >= 0) //Determines number of times grade is entered by the user p[inputVal]++; }while (inputVal != -1); //Display output for(int j = 0; jRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.