Question: 47) Define an integer ( i ), an integer array called score with 5 elements, and an integer max. Prompt the user to enter 5

47) Define an integer \\( i \\), an integer array called score with 5 elements, and an integer max. Prompt the user to enter 5 scores with the prompt "Enter 5 scores: ". Read in a value from the keyboard into the \\( 0^{\\text {th }} \\) element of the array. Set the max to the \\( 0^{\\text {th }} \\) element of the array. Then create a for loop that uses an integer \\( \\mathrm{i} \\) to run from 1 to 5 . Inside the loop read in a value into the ith element of the array. Check to see if the value in the array is greater than max. If so, set max to the new value

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!