Ask Question
18 December, 11:13

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;

+3
Answers (1)
  1. 18 December, 11:59
    0
    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.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “What would be the value of bonus after the following statements are executed? int bonus, sales = 1250; if (sales > 1000) bonus = 100; if ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers