subject

The code below is supposed to display the name and score for the student with the highest score one time before the program ends. It is displaying Jim as the student with the highest score. It is displaying the highest score of 95. Unfortunately, Jim does not have a score of 95. Correct the following code: Declare String students[SIZES] = {"Jen", "Jon", "Jan", "Joe", "Jim"}
Declare Integer scores[SIZES] = 70, 85, 72, 95, 90
Declare Integer index Declare Integer highest = scores[0]
Declare Integer highest Name = " " For index = 0
To SIZES //Assume that this translates to For (index = 0; index <= SIZES, index ++)
If scores[index] > highest then highest = scores[index]
End Of highestName = students[index]
End For Display "

The name of the student with the highest score is ", highest Name Display "The highest score is ", highest

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place?
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
The qwerty keyboard is the most common layout of keys on a keyboard
Answers: 3
question
Computers and Technology, 23.06.2019 04:31
Cloud computing service providers manage different computing resources based on the services they offer. which resources do iaas and paas providers not manage? iaas providers do not manage the for the client, whereas paas providers usually do not manage the for their clients. iaas- storage server operating system network paas- applications interafce storage vertualiation
Answers: 2
question
Computers and Technology, 23.06.2019 07:00
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
You know the right answer?
The code below is supposed to display the name and score for the student with the highest score one...
Questions
question
Mathematics, 26.11.2020 22:30
question
Chemistry, 26.11.2020 22:30
question
Mathematics, 26.11.2020 22:30
question
Chemistry, 26.11.2020 22:30
Questions on the website: 13722361