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
Marat540 [252]
3 years ago
7

C++ Proagram

Computers and Technology
1 answer:
lions [1.4K]3 years ago
5 0

Answer:

Replace /* Your solution goes here */

with

for (i = 0; i < SCORES_SIZE-1; ++i) {

bonusScores[i] += bonusScores[i+1];

}

Explanation:

In C++, the index of an array starts from 0 and ends at 1 less than the size of the array;

Using the analysis in the question, the above code (in the answer section) iterates from the index element (element at 0) to the second to the last element (element at size - 2)';

This is to ensure that the element of the array only adds itself and the next element;except for the last index which remains unchanged

The following operation is done in each iteration.

When i = 0,

<em>bonusScores[0] = bonusScores[0] + bonusScores[0+1]; </em>

<em>bonusScores[0] = bonusScores[0] + bonusScores[1]; </em>

<em>bonusScores[0] = 10 + 20</em>

<em>bonusScores[0] = 30</em>

When i = 1,

<em>bonusScores[1] = bonusScores[1] + bonusScores[1+1]; </em>

<em>bonusScores[1] = bonusScores[1] + bonusScores[2]; </em>

<em>bonusScores[1] = 20 + 30</em>

<em>bonusScores[1] = 50</em>

<em />

When i = 2,

<em>bonusScores[2] = bonusScores[2] + bonusScores[2+1]; </em>

<em>bonusScores[2] = bonusScores[2] + bonusScores[3]; </em>

<em>bonusScores[2] = 30 + 40</em>

<em>bonusScores[2] = 70</em>

<em />

<em>This is where the iteration stops</em>

You might be interested in
Which sns gets its names from one of its unique features
Komok [63]

Answer:

no

Explanation:

3 0
3 years ago
The _______ dialog box displays formatting tabs for Font, Number, and Alignment
statuscvo [17]

Answer:

The <u>Format Cells</u> dialog box displays formatting tabs for Font, Number, and Alignment

Explanation:

In MS Excel, Format Cells dialog box option, we found the following formatting tabs:

  • Number
  • Font
  • Alignment

To access the format cells dialog box, we follow the following steps.

  1. In MS Excel, Right click in Cell that needs formatting
  2. A drop down menu Show, Click on Format Cells option from the list.
  3. A dialog box appears that have different tabs of Number, Font, Alignment and protection
  4. Select the tab, where you want to change the format.

5 0
3 years ago
In this problem, you will write a translation program. First your program will prompt the user for three filenames. The first fi
Mrac [35]

Answer:

Ohh...................................................

6 0
3 years ago
An example for Shareware?
Kryger [21]
A software that is free of cost for a certain amount of time such as Adobe programs, or Winzip.
6 0
2 years ago
Read 2 more answers
PLEASE ANSWER THESE TWOO❤️❤️
alisha [4.7K]
Its
1 - c
2 - d
Thank you
8 0
3 years ago
Other questions:
  • Anderson uses his computer and internet link to chart the movement of his favorite 46 stocks. He buys and sells according to the
    15·1 answer
  • Clicking a _____ takes you to a webpage that no longer exists or has been moved.
    9·2 answers
  • You are the administrator for a small company. You need to create a new group for users in the sales department. You need to nam
    14·1 answer
  • Which would be included in a SaaS platform?<br><br> A.data link<br> B.IaaS<br> C.Java<br> D.vb.net
    5·1 answer
  • 5. How would you describe the relationship between blocks of code and commands?​
    14·2 answers
  • What is computer? Give short answer for this ​
    7·2 answers
  • Using the simple alphabet code below, you will decode and encode the message. Write the Full
    6·1 answer
  • When text is used as a Hyperlink, it is usually underlined and appears as a different color.
    11·1 answer
  • 2. It enables you to gather data on a specific topic. *a.Interviewb.Questionnairec.Surveyd.Research
    14·1 answer
  • The process of providing only the essentials and hiding the details is known as _____. Group of answer choices algorithm abstrac
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!