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

What is the hardest part of thermodynamics?
Solve each system of equations by using a table. y= 3x - 4 y = -2x + 11
I NEED HELP!! I don’t understand this question!
f(x)=x -1 g(x)=-4x2 + 4 Find (f o g)(x)​
How was Sumer organized politically? as an empire as a republic into city-states into tribal villages
If EF = 6 and EG = 23, find the value of FG.
-4x + 3y + 2x = what does this equal?
Which algebraic expression is a difference with two terms? O A. 6(x+5) OB. 6 + x-9 O C. 6x - 9 O D. 9x6
If 5 people take up approximately 3 square feet, estimate the size of a crowd at a concert in the park in a space that is half a mile long and 30 feet deep. Dra
Horizontal and parallel lines b and c are cut by transversal a. At the intersection of lines b and a, the bottom right angle is 50 degrees. At the intersection