Ask Question
22 November, 13:16

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;

+1
Answers (1)
  1. 22 November, 16:20
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers