1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vfiekz [6]
3 years ago
12

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
Computers and Technology
1 answer:
Alona [7]3 years ago
7 0

Answer:

Modify

<em>If scores[index] > highest then highest = scores[index] </em>

<em>End Of highest</em>

<em>Name = students[index] </em>

<em>End For Display</em>

to

<em>If scores[index] > highest then highest = scores[index] </em>

<em>Name = students[index] </em>

<em>End Of highest</em>

<em>End For Display </em>

<em />

Explanation:

In the code, you posted the code segment that gets the name of the student with the highest score is outside the if condition that determines the highest.

To make correction, we only need to bring this code segment into the loop.

<em>See Answer</em>

You might be interested in
Describe two ways the ARPANET is different from the internet
spayn [35]
ARPANET was the network that became the basis for the Internet. Based on a concept first published in 1967, ARPANET was developed under the direction of the U.S. Advanced Research Projects Agency (ARPA). In 1969, the idea became a modest reality with the interconnection of four university computers. The initial purpose was to communicate with and share computer resources among mainly scientific users at the connected institutions. ARPANET took advantage of the new idea of sending information in small units called packets that could be routed on different paths and reconstructed at their destination. The development of the TCP/IP protocols in the 1970s made it possible to expand the size of the network, which now had become a network of networks, in an orderly way.
8 0
4 years ago
Dan needs to ensure that delegates as well as those looking at his shared calendar information are unable to see the details of
Klio2033 [76]

Answer:

If Dan uses Google Calendar application, he may edit the public visibility to "private" mode. Then, only the host of the meeting can see details. Usually can he hide the guest list but the meeting agenda is unlikely.

Explanation:

3 0
4 years ago
SLA:
Sphinxa [80]

Answer:

Objective

1 . b

2.a

3.b

4.a

5.a

6.b

7.a

8.b

9.a

10.a

8 0
3 years ago
The condition, ____, entered in the criteria row of a long text field in a query window would retrieve all records where the lon
skad [1K]
A query criterion<span> is an expression that Access compares to query field values to determine whether to include the record that contains each value</span><span>
The condition, *education, entered in the criteria row of a long text field in a query window would retrieve all records where the long text field had any mention of education.</span>
6 0
3 years ago
Select the correct answer.
saveliy_v [14]

Answer:

its TASCAM porta studio

Explanation: i got it right on edge

6 0
3 years ago
Other questions:
  • A company ABC asked you to design a simple payroll program that calculates and employee's weekly gross pay, including any overti
    9·1 answer
  • identify three of the many shared ethical standards among businesses that are incorporated in codes of ethics
    6·2 answers
  • Which is not the option applicable to the technology reference framework for advanced countries?
    11·1 answer
  • For window 7 explain the steps you will use to find the available program you will list.
    13·1 answer
  • What is Deep learning
    9·1 answer
  • What are the coordinates of the origin point? (Select the best answer.)
    10·1 answer
  • Name a device, app or website then give features of the app that make it addictive and humane. (3 details for each)
    5·1 answer
  • Which of the following is a setting in both the Transparency panel and the Mirror panel?
    10·1 answer
  • Which of the following is a correctly named cell?<br> B8<br> BB-8<br> 8-B<br> 8B
    11·1 answer
  • (python) Given the formula for conversion from Celsius to Fahrenheit
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!