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

35. What factor primarily controls the viscosity, and therefore the explosiveness of a magma? A. Dissolved gases B. Pressure C. Temperature D. Water E. Mineral
2. In the case of _______ the US supreme court decided that it was permissible to create separate but equal public accomdations for african americans and "white
Why did California's request to be admitted into the Union cause a problem?​
What would the answer for this question be??
A. 25B. 40C. 250D. 400Help me please and tha k you​
What is the weight of a 90kg man standing on Earth, where gearth = 9.82 m/s2? A. 884 N B. 9.2 N C. 80.2 N D. 99.8 N
How can a physical place change over time?
True or False : The veiling of women originated in the Islamic culture.
What are the two main functions of sclereids or stone cells and are sclereids alive at maturity?
Which amendment protects against double jeopardy? Question 8 options: Fifth Second Tenth Third