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
Type the correct answer in the box. Spell the word correctly.
Liono4ka [1.6K]

Translators convert code written in a high-level language to the machine language.

4 0
3 years ago
Read 2 more answers
True or false: pinhole cameras can be outfitted with very accurate viewfinders
arsen [322]

Answer:

true

Explanation:

4 0
3 years ago
Read 2 more answers
What do you understand by multitasking?Explain cooperativemultitasking ?
Nadusha1986 [10]

Answer: Multitasking is the ability of the operating system by which a processor is able to process multiple task at the same time.

Cooperative multitasking is non preemptive multitasking where the processor is assigned to a single process and does not preempt  until it completes its jobs or moves to a waiting state.

Explanation:

In Multitasking jobs are executed at a faster rate than as many jobs or tasks can be assigned to the processor at the same time.

In cooperative multitasking due to the non preemptive nature a single job could be assigned to the cpu at a time.  

4 0
3 years ago
Read 2 more answers
3 examples of operating systems ​
Citrus2011 [14]

Answer:

Linux, Windows, Macintosh

Explanation:

8 0
3 years ago
1. The @ symbol is used to denote:​
devlian [24]

Answer:  @ is sometimes used as a logical symbol to denote the actual world (the world we are "at").

Explanation:

3 0
3 years ago
Other questions:
  • Modify the list according to the following: append the smallest value at the end of the list when all numbers in the list are ne
    14·1 answer
  • Write an if-else statement to describe an object. Print "Balloon" if isBalloon is true and isRed is false. Print "Red balloon" i
    9·1 answer
  • Write a program that prompts the user to enter the minutes (e.g., 1 billion), and displays the number of years and days for the
    13·1 answer
  • A lack of financial literacy can cause you to lose your
    10·1 answer
  • True/False/Unknown. For the interpretation of function calls, we assign the formal parametersto the valuations of the actual arg
    11·1 answer
  • This is a human-made physical system.
    15·1 answer
  • I'm in Paris and want to take a picture of my mom in front of the Eifel Tower. I want both her and the tower to be in sharp focu
    14·2 answers
  • What type of task can be defined to allow you fine-grained control over the management tasks a user can perform in an OU
    14·1 answer
  • Active directory and 389 directory server are both compatible with which directory access protocol?
    6·1 answer
  • What symbol do we use to assign a value to a variable or constant in algorithms?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!