jadahlynnhuges2665 jadahlynnhuges2665
  • 03-03-2020
  • Computers and Technology
contestada

What would be the value of bonus after the following statements are executed? int bonus, sales = 1250; if (sales > 1000) bonus = 100; if (sales > 750) bonus = 50; if (sales > 500) bonus = 25; else bonus = 0;

Respuesta :

ijeggs
ijeggs ijeggs
  • 04-03-2020

Answer:

100

Explanation:

The statement uses a several if statements to check the variable sales and determine the amount of bonus.

The first if statement assigns the the value of 100 to bonus if sales is greater than 1000.   if (sales > 1000) bonus = 100;

Since sales has been assigned the value of 1250, sales = 1250; then this condition is true and the value of bonus becomes 100.

Answer Link

Otras preguntas

Which is the newest monotheistic faith?
PLEASE I NEED HELP!!!!
how to solve 3x+y=6 and y=-3 using substation method
In your own words, what is the ‘mental health’ dilemma?
People can help in the _________________________ of forests by planting new trees.
Does someone know this answer to this question if you do pls tell me
guys help i only have 10 more minutes left ;-;
A liquid is placed in a closed container and time passes until the level of the liquid is constant The general situation described by the rate of evaporation is
HeLp! ;^; (05.05)The width of a rectangle is shown below: A coordinate plane with a point A at negative 3, 3 and C at negative 3, negative 2. If the area of the
How does Whitman express his own grief to the death of Lincoln? A) He says "But o heart! Heart! Heart!” B) He says "rise up!” C) He refers to his passing as a d