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

simplify -8+4(c-9)-5+6c+2c
How did Muslim culture influence the rest of the world?
What is form? List the four categories of form
Question 3 of 10 How is a scientific theory developed?
Explain Sufism and how Sufis helped spread Islam.
why ya dont answer my question
The sum of -4n and 5n is -82
Your bedroom has a rectangular shape, and you want to measure its area. You use a tape that is precise to 0.001 m m and find that the shortest wall in the room
SOMEONE PLEASE HELP ME THIS WAS DUE LAST WEEK
Several studies have found that in the United States ,their is a rising trend of obesity for people between the ages of 2 and 19. What does this say about the c