Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that dynamically allocates an array in the freestore large enoug

ID: 3646639 • Letter: W

Question

Write a program that dynamically allocates an array in the freestore large enough to hold a user defined number of test scores as doubles. Once all the scores are entered, the array should be passed to a function that finds the highest score. Another function the array should be passed to a function that finds the lowest score. Another function should be called that calculates the average score. The program should show the highest, lowest and average scores. Must use pointer notation in the functions to pass the array. Add some user input protection to prevent negative numbers.

Explanation / Answer

following code will provide you all the values in a same program. "#include 002 003 using namespace std; 004 005 // function prototypes 006 void j_score (int&); 007 void findlowest (int); 008 void findhighest (int); 009 void calcscore (); 010 011 int main() 012 { 013 014 // declarations 015 int score, i; 016 int judge[5]; 017 018 // loop to prompt user for each judge's score 019 for (i = 0; i < 5; i++) 020 { 021 // function call 022 j_score (score); 023 // assign score for each judge 024 judge[i] = score; 025 } 026 027 // function call to calculate final score 028 calcscore(); 029 030 // end main 031 return 0; 032 } 033 034 // judges score function 035 void j_score (int& score) 036 { 037 // prompt user for input 038 cout > score; 040 cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote