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
. Identify an emerging crime issue in your community using data available from sources such as local newspapers, online police r
Minchanka [31]

A crime problem in my community is related to cell phone theft. According to the local newspaper, it is estimated that in my city about 10 cell phones are stolen per week. Still according to the local newspaper, most of these robberies occur in the city center and in the periphery, with women being the biggest victims.

Although the police have shown themselves to be a restraining force on this type of crime, few arrests have been made successfully, mainly for the negligence of the victims in providing a complaints.

The main driving force behind this crime is drug trafficking. Most burglars steal cell phones to sell them and have money to buy drugs. This is totally related to the government's neglect to promote quality education in the city, allowing several children and young people to stay on the street and run the risk of becoming involved in the traffic.

A cause and effect diagram for this situation is:

Irresponsible government ---> poor quality education ---> children and adolescents on the streets ---> involvement in drug trafficking ---> theft of cell phones ----> frightened population --->  lack of complaints ----> criminals on the street.

3 0
2 years ago
Shelby likes to play video games on an old Atari video game system. No matter how old the cartridge, when she inserts it into th
Nady [450]

Answer:

ROM (Acronym of Read-only memory. (video games))

Explanation:

7 0
3 years ago
Read 2 more answers
For what purposes do students collect data? Check all that apply.
Bumek [7]

Answer:

sounds like all of the above

Explanation:

only one im not 100% sure on is to examine a question's reliablity

5 0
3 years ago
Read 2 more answers
You can use the ____ utility to zero in on the service or other program that is slowing down startup. 1. gpupdate 2. MSconfig 3.
Step2247 [10]
I'd say MSconfig, you can use that and view the 'processes' tab, but it will make you open up the task manager.
3 0
3 years ago
How do i do this?
Ksivusya [100]

Answer: deezzz mf nuts

Explanation:

5 0
3 years ago
Other questions:
  • If K is a foreign key in relation R1, then
    10·1 answer
  • What do developers do to support software products? explain to users which development process model was used to make the produc
    8·1 answer
  • What does resolution mean on a computer monitor?
    9·2 answers
  • Systems Software, Inc., is introducing a new piece of sophisticated graphics software. A recently hired writer has been assigned
    8·1 answer
  • If two egg cells are fertilized what will happen?
    10·1 answer
  • At each layer of the OSI model, data is appended to the original message and then sent on to the next lower layer. What is this
    10·1 answer
  • EASY POINTS what favorate food<br> so easy
    7·2 answers
  • Identify the correct answer in each item. Write your answer on the blank provided before
    13·1 answer
  • When delivering digital technologies to clients, what is a best practice to make those solutions sustainable?
    10·1 answer
  • Profitability, consumer relations, and competition are involved in what kinds of concerns in the design process?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!