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

A storage tank shaped Like a rectangular prism is being manufactured to hold 100,000 cubic feet of natural gas. It has a length of 10 feet and a width of 25 fee
What Canadian city is across a body of water from New York
factoring 12m^2n^2-8mn+1=
factoring 12m^2n^2-8mn+1=
What do you mean by corrosion? How can you prevent it?
1. Why are there active volcanoes along the Pacific coast in Washington and Oregon but not along the East coast of the United States?
distribute (x+1)(x-2)
One way to show that a statement is NOT a good definition is to find a _____ converse.conditional.counterexample.biconditional.
Kim estimates that the faucet in her kitchen drips at a rate for 1 drop every 2 seconds. Erik wants to klnow how many times the faucet drips in a week.
What do you mean by corrosion? How can you prevent it?