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

really confused with this one, please help
Joey has 24 coins in his pocket, the coins are all nickles and dimes. the total value of the coins is 1.85. how many dimes does joey have?
What is the answer to this????
NEED HELP IN MATH , SERIOUS ANSWERS PLEASE
Which of the following is a biotic factor? a. Parasites b. Sun c. Soil d. Temperature
which process of the water cycle occurred when water absorbs 2260 joules of heat energy per gram
Large companies such as Walmart, IBM, and Ford are classified as A. S-corporations. B. C-corporations. C. limited liability companies (LLCs).
Why is it critical to add the bill of rights to the US constitution?
what information does an informative essay need
Chest compressions should be initiated