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
Why is hard disk called random access medium​
Effectus [21]

Answer:

Data is accessed in a random-access manner, meaning the individual blocks of data can be stored and retrieved in any given order or time.

Explanation:

5 0
1 year ago
Read 2 more answers
Which of these devices is usually the default for most home network?
lora16 [44]

Answer:

there are no mutiple choices

5 0
3 years ago
In preemptive priority scheduling, when a process arrives at the ready queue, its priority is compared with the priority of:____
dybincka [34]

Answer:

Currently running process

Explanation:

In preemptive priority scheduling there is usually a form of comparison of the schedule with the other function or processes which are present in the queue also.

In preemptive priority scheduling, when a process arrives at the ready queue, its priority is compared with the priority of currently running process.

6 0
3 years ago
Need help asap <br>I will marks as brainliest ​
ra1l [238]

Answer:

<em>1</em><em>.</em><em> </em><em>is</em><em> </em><em>true</em>

<em>2</em><em>.</em><em> </em><em>is</em><em> </em><em>true</em>

<em>3</em><em>.</em><em>is</em><em> </em><em>true</em>

3 0
3 years ago
What are some excuses for not attending online classes ( for students )​
sp2606 [1]

Answer:

  1. l was asleep
  2. l was working or helping my mom
  3. l was sick
6 0
2 years ago
Other questions:
  • Which of the following are you likely to find between multiple school buildings in a city wide school district?
    9·1 answer
  • What is Microsoft Word an application used for word-processing, an example of?
    10·1 answer
  • Define and implement a method that takes a string array as a parameter and returns the length of the shortest and the longest st
    6·1 answer
  • Two routers connect with a serial link, each using its S0/0/0 interface. The link is currently working using PPP. The network en
    6·1 answer
  • The Sleeping-Barber Problem:
    15·1 answer
  • What will be a fundamental aspect of future games?
    10·2 answers
  • David bought 5.2 pounds of oranges for $1.20 per pound . how much did david spend ..............................................
    12·1 answer
  • Discussion Topic
    8·1 answer
  • What is the value of x after running this code?
    13·2 answers
  • After a Hacker has selects her target, performed reconnaissance on the potential target's network, and probed active Internet Ad
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!