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
netineya [11]
3 years ago
15

URGENT: I need to add a while loop in this program but I don't know-how. I am also having trouble neatening some lines of code.

Computers and Technology
1 answer:
dangina [55]3 years ago
8 0

Answer:

Answer is in the provided screenshot.

Explanation:

You are making this more confusing for yourself by doing it like this.

I have added variables at the top of your program for game messages that are repeated - and also simplified the given cases for if the player wins, loses or ties.

I invite you to now make a point tracker that, at the start of each game says: You have "x" points.

And you gain a point for winning, lose a point for losing and nothing happens if you tie.

To add a while loop - simply use the "while" keyword, and anything within the loop will repeat while the given condition is true.

You might be interested in
X2/3-2x1/3-35=0
Ganezh [65]

Answer:

x2/3-2x1/3-35=0

Two solutions were found :

x =(2-√424)/2=1-√ 106 = -9.296

x =(2+√424)/2=1+√ 106 = 11.2

Explanation:

7 0
3 years ago
Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards
konstantin123 [22]

Answer:

for(i = 0 ; i < NUM_VALS; ++i)

{

   cout << courseGrades[i] << " ";

}

cout << endl;

for(i = NUM_VALS-1 ; i >=0 ; --i)

{

   cout << courseGrades[i] << " ";

}

cout << endl;

Explanation:

The first loop initializes i with 0, because we have to print the elements in order in which the appear in the array. We print each element, adding a space (" ") character at its end. After the loop ends, we add a new line using endl.

The second loop will print the values in a reverse order, so we initialize it from NUM_VALS-1, (since NUM_VALS = 4, and array indices are 0,1,2,3). We execute the loop till i >= 0, and we print the space character and new line in a similar way we executed in loop1.

4 0
3 years ago
If you wanted to create a line of code that would add ten to the user’s current score, which code should you use?
Korvikt [17]

Answer:

choice c

Explanation:

score = score + 10

because the rest doesn't make since and score == score + 10 has an extra equal sign.

7 0
3 years ago
Read 2 more answers
You wish to lift a 12,000 lb stone by a vertical
Shkiper50 [21]
Ndnsnskiaqosikejwnw sorry
3 0
3 years ago
Kumar was working on his term paper and had not saved his work before the battery died on his laptop. He panics because the pape
Nina [5.8K]

Answer:

By presuming Kumar was working on his term paper using Microsoft Word, he can be advised to restore the unsaved document using the Recover Unsaved Documents feature in Word.

Explanation:

Firstly, Kumar can click File tab in Word and click Manage Document. Kumar shall find the option Recover Unsaved Documents from a drop down list and he can click it as his option. At this stage, Kumar shall see the missing files in the dialog box. The recent loss file shall appear in the dialog box. Just open the desired document and save it.

4 0
3 years ago
Other questions:
  • 6. An art museum owns a large volume of works of art. Each work of art is described by an item code (identifier), title, type, a
    6·1 answer
  • Minimalism is a major movement in postmodern art. O True O False
    14·1 answer
  • How many apostrophes or quotation marks in a row should you use to begin and end a multi-line string?
    14·2 answers
  • If you sort by Last Name, Ascending, which of the following last names would come first in the list?
    12·1 answer
  • A provides an easy way for workers to interact with their computers
    9·1 answer
  • 14. Convert 11110111 from binary to denary<br> (1 Point)
    12·2 answers
  • PLEASE VERY IMPORTANT Conduct research on graphic design skills in your area and explore the different courses that they offer l
    12·1 answer
  • How dose society use computer in government?​
    5·1 answer
  • which of the following devices and and receive information from other device? a parallel port B serial port C video port d both
    8·1 answer
  • It is important to consider design details when creating an api because: ______________
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!