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
Nikolay [14]
3 years ago
13

In a certain game, the integer variable bonus is assigned a value based on the value of the integer variable score.

Advanced Placement (AP)
2 answers:
Bingel [31]3 years ago
5 0

Answer:

See Explanation

Explanation:

The options are not properly presented; hence, they can't be used to answer this question

First, we need to analyze the conditions:

  • score > 100 implies bonus = 2 * score
  • score between 50 and 100 implies bonus = score
  • score < 50 implies bonus = 0

Writing the above as programming instructions, we have:

if(score > 100){//This represents the first condition

bonus = 2 * score;

}

else if(score >=50 && score<=100){//This represents the second

bonus = score;

}

else{//This represents the last condition

bonus = 0;

}

<em>Note that, we assume that all variables have been declared</em>

<em>The comments (//) were used for explanation purpose</em>

marishachu [46]3 years ago
4 0

Answer:

A and D

Explanation:

In a certain game, the integer variable bonus is assigned a value based on the value of the integer variable score.

If score is greater than 100 bonus is assigned a value that is 10 times score

•If score is between 50 and 100 inclusive, bonus is assigned the value of score.

If score is less than se, bonus is assigned a value of 0

Which of the following code segments assigns bonus correctly for all possible integer values of score?

Select two answers

Answer : A and D

You might be interested in
Leaders who can motivate people usually have teams with
Mrac [35]

Leaders who can motivate people usually have teams with positive work attitudes. These attitudes are fundamental for generating confidence.

<h3>What is a leader?</h3>

A leader is a skilled person who generally exhibits a positive attitude toward facing challenges and problems.

The leaders can generate confidence between the members of a team through these positive attitudes.

An excellent leader should think about the team instead of individual non-altruistic objectives.

Learn more about leader attitudes here:

brainly.com/question/1997724

6 0
2 years ago
Read 2 more answers
Give an example of a disease that causes a defect in axon structure.
marin [14]
<span>Charcot–Marie–Tooth disease ................................</span>
7 0
3 years ago
Which of the following arguments supports the United States's need to rely less on fossil fuels and seek alternative
Ray Of Light [21]

Answer:

The United States has few reserves and a very high consumption rate.

Explanation:

If the United States keeps using fossil fuels, they will run out very quickly and an alternative will be needed, the second answer choice supports that.

4 0
2 years ago
Artículos periodísticos que hablen sobre la filosofía
MissTica
Newspaper articles that talk about philosophy
6 0
3 years ago
According to Jared Diamond, what are the three major elements that separate the world's "haves" from the "have nots"?​
Vsevolod [243]

Answer:

guns, germs, and steel

Explanation:

the three major elements that separate the world's haves from the have-nots are developing agriculture, living in areas without natural geographic barriers, and acquiring immunity to diseases.

6 0
2 years ago
Other questions:
  • People who view their identity as a part of a group represent the idea of
    11·1 answer
  • Country A is a more developed country with a low birth rate, a low total fertility rate, a high life expectancy, and a high perc
    12·1 answer
  • What are your responsibilities as the owner of a vehicle?
    11·1 answer
  • Three of the following infractions are worth 4 points on your license. Which is worth 6 points?
    15·1 answer
  • According to eriksons stage of psychological development, children learn to trust and eventually form a close attachment to thos
    13·1 answer
  • Simplify 3 to the negative 8 th power times 3 to the 4 th power
    10·1 answer
  • What is psuedopsychology?
    15·1 answer
  • How did superimposed boundaries cause ethnic conflict in the Belgian Congo, now present-day, Democratic Republic of Congo?
    9·1 answer
  • *****URGENT!!! Please help asap!! due in 25 minutes!! marking brainliest!!!*****
    6·1 answer
  • “The Roman Emperor is Julius Caesar.” is ...
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!