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

which of the following would not make a good insulator* rubber*plastic*wood*metal
You hear a thunder 3 seconds after you see lightning. How far away is the storm?
Cellular respiration involves a series of chemical reactions. Which of the following is a primary way that enzymes affect these reactions? A. They decrease the
solve quadratic equation by factoring How do you do it 3k^2 + 72 = 33k
solve quadratic equation by factoring How do you do it 3k^2 + 72 = 33k
Tatum weighs 47.39 kilograms.What is is her mass rounded to the nearest whole number?A.50 KilogramsB.48 KilogramsC.47.4 KilogramsD.47 Kilograms
You hear a thunder 3 seconds after you see lightning. How far away is the storm?
What is hyperbole? Please help
Maria exercises for 2 1/7 hours every Saturday. She runs for 1/3 of the time that she exercises. How much time does she spend running every Saturday?
write a paragraph for me using these words: art critic and art historian