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
Which of these might be an example of an advertiser's target group?
d1i1m1o1n [39]

Answer:

I would assume C. because it's the answer that makes the most sense.

Explanation:

D. would be the other choice however, just because they live in the same region doesn't mean they watch TV or have any access to media.

5 0
3 years ago
Read 2 more answers
What is the benefit of working with a ready-to-use cloud based AI vendor service?
nasty-shy [4]

Answer:

Explanation:

A cloud model allows organizations to purchase only the storage they need – when they need it – eliminating traditional infrastructure expenses. With this model, an organization can use these cost savings for AI development

7 0
3 years ago
Owners of individual domains get to decide what content is published on their websites. Why might this autonomy be important to
Alika [10]

Answer:

Explanation:

With an individual domain name we can upload all the content we want, in a free domain or share domain, upload content in some cases have a limit, for example the size of an image, in an individual domain we can add our brand, in a shared, we can add our brand side to company share those domains, we can have our own email address, practically we have a complete autonomy in our website.

4 0
3 years ago
Write a subclass named 'ReadWrite' with the following additional behavior: Any necessary constructors. a method named 'setVal' t
nataly862011 [7]

Answer:

Java Class given below

Explanation:

class ReadOnly

{

protected int val;

public ReadOnly(int arg)

{

val = arg;

}

public int getVal()

{

return val;

}

}

class ReadWrite extends ReadOnly

{

private boolean dirty;

public ReadWrite(int arg)

{

super(arg);

dirty = false;

}

public void setVal(int arg)

{

val = arg;

dirty = true;

}

public boolean isDirty()

{

return dirty;

}

}

6 0
3 years ago
Jamal likes the theme he has chosen, but he wants to make his presentation more interesting before he saves it. Which command gr
icang [17]

Answer: Variants

Customize

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • Technician A says that OBDI and OBDII use different DLC connectors. Technician B says that OBDII standardizes the designations f
    13·1 answer
  • A firewall, when properly implemented, can prevent most attacks on your system.
    11·1 answer
  • Describe Ms word environment.​
    14·1 answer
  • For an external usb hard drive attached to a computer, which is more suitable: a writethrough cache or a block cache
    14·2 answers
  • Stores of data that are so vast that conventional database management systems cannot handle them, and very sophisticated analysi
    9·1 answer
  • ___________________ are aggregated collections of memory and cpu resources that can be shared among groups of virtual machines o
    11·1 answer
  • To print the last element in the array named ar, you can write :A. System.out.println(ar.length);
    13·1 answer
  • Hi, what’s up, im really bored and have nothing to do
    7·2 answers
  • Definition of digital
    9·2 answers
  • Which statement is most likely to be true about a computer network?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!