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

Just do part B it might be easy for u
The price of a pair of shoes is $63.20. The sales tax rate is 4.5 percent. How much sales tax would you pay if you bought these shoes? A.) $2.84 B.) $3.16 C.) $
Avery thought his new math teacher was cold and ineffective. But by the end of the year, he liked him. This is an example of the:
Am I correct to say this is correctly punctuated? Wading in the shallow water, Courtney found dozens of interesting seashells.
You should eat_____grams of carbohydrates per pound of body weight
What is responsible for soil erosion in Central America?
Describe functionalism
how did The roman republic influenced the constitution of the united states
Is the internet useful and why
please help me find a good concluding sentence and if you can please edit it?