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

find the product and simplify your answer. 5x(3x5+2x-2)​
Describe the components of the peripheral nervous system and central nervous system and explain how they work together in your body.
What graph is an inverse graph?​
Which of the following is the BEST definition for the term VERBAL? A B C or D ?
For a sustainable fission reaction, each fission must produce exactly _____ additional fission reaction(s).
How did joining NAFTA affect the Mexican economy ?
Please explain btw you can use symbols to use things like √ ² ³
Your boss wants to know the address of the router that his computer is using. What do you tell him? a) Find out what the default gateway is of his computer. b)
Find the least common denominator for these two rational expression 4/s^2 -7/7s^2
Write a linear or exponential equation from the following points: (5, 12.5) (3, 7.5)