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

Evidence supporting a claim and counterclaim in an argument can be based on an appeal to emotion. This type of appeal is called
2x+8<5x-4 solve the inequality
Which substance is less soluble in hot water than in cold water? A KBr B NaNO3 C CO2 D Naci
Jan and Wayne went to the store to buy some groceries. Jan bought 2 cans of corn beef hash and 3 cans of creamed chipped beef for $4.95. Wayne bought 3 cans of
what are the solutions to the system of equations {-x+y=4 {y+12=x^2+x
What is the 100th term of the sequence 7, 4, 1, -2 ...
Write a paragraph in which you explain three ways that the Byzantine empire affected the development of russia
archeology is came from the word what?
The system of equations y=-2x+1 and y=x+5 is shown on the graph below.
For which two reasons did the Iroquois Confederacy eventually side with the British?