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

Choosing to follow a doctors medication orders is most wise. true or false
If your experiment did not seem to match the expected results, what did you learn from the experience?
1. Which statement below best explains the conflict that led to the French and Indian War? a. Control of the resources and territory in the Ohio River Valley b.
Assume you are bequeathed $500 by a long-lost cousin. You decide that, for the next year, you will put all that money in the bank until you decide what to do wi
Where is the midline of this function?
how many years did it take for dutch to settle in to North America
are hot flashes, being tired normal side affects of being on b i r t h c o n t r o l for two days
Three type of symbiosis
Find the quotient of 4 and -9. 36 0 -36
Which of the following components do ALL cells have in common? (Check all answers) A Nucleus B DNA c Organelles DCell wall