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
ser-zykov [4K]
2 years ago
12

Write a program that simulates applying a "boost" to a spaceship in a spaceship race game.

Computers and Technology
1 answer:
rewona [7]2 years ago
8 0

Programming languages can be used to simulate several scenarios; in this case, the "boost"

The simulating program in C++ where comments are used to explain each line is as follows:

#include<iostream>

#include<cstdlib>

#include<ctime>

using namespace std;

int main() {

 // This sets the seed to time(0)

 srand(time(0));

 // This generates a random number between 0 and 10, to represent the boost

 int boost = rand()%10;

 // This prints the required outputs

 cout << "Boost: " << boost;

 cout << "\nDistance travelled: " << boost;

 return 0;

}

Read more about similar programs at:

brainly.com/question/16240699

You might be interested in
What new deal programs were created to build dams to control flooding and generate electric power?
rewona [7]
<span>TVA (Tennessee Valley Authority).

</span><span>Recovery-1933 program created to provide jobs. Built dams in order to generate cheap electricity and control flooding in TN, GA, AL, and KY. Sparked controversy because companies that provided electricity would now have to compete with the government. Eliminated flooding, gave thousands electricity for the first time, improved transportation and forced 15,000 families to move.</span>
3 0
3 years ago
What is the Intranet?<br>​
brilliants [131]

Answer:

a local or restricted communications network, especially a private network created using World Wide Web software.

Explanation:

8 0
3 years ago
How might an engineer test a computer chair for comfort?
Masja [62]
They instance, "user trial engineer" may refer to a human factors professional who specialists in user trails. Reliability works stress and training as these may relate to human-system and human-computer interaction design.
4 0
3 years ago
If parties in a contract are not ____, the contract can be canceled.
Anastasy [175]
Agreed to all the terms mentioned in the contract
5 0
3 years ago
How can templates be made available to other users?
Daniel [21]

Answer:

b

Explanation:

4 0
3 years ago
Other questions:
  • Write a program which can do a String Check if its Panagram or not!
    10·1 answer
  • Instructions:Type the correct answer in the box. Spell all words correctly.
    14·2 answers
  • What port in your computer will you use to plug in your camera?
    14·2 answers
  • Amazon SWF is restricts you to use a specific programming language when setting up a work flow
    8·1 answer
  • What is the most likely result of making a plan for life after high school
    14·1 answer
  • Write a question that the database will understand. Which records are not equal to 5? &lt; 5 &gt; 5 &gt; =5 &lt; &gt; 5
    15·1 answer
  • A(n) ________ software installation copies all the most commonly used files to your computer's hard drive.
    10·1 answer
  • Determine whether the phrase below is a sentence or a fragment.
    12·1 answer
  • What is the scope of numC?
    8·2 answers
  • Write a boolean expression that is true if s references the string end.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!