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

What is communication withoutwords
1/x - 1/(x+1) ≤ 0 Please help quickly
What is the GCF OF 52 and 32. Need work to be shown
what is 3 expressions where the solution is 4
Adams and his dad share the cost of a meal in the ratio of 2:3. Adams dad pays 52.20 what is the total cost of the meal
6r-7/10=r/40 (please explain)
Audrey is buying a new car for $32,998.00. She plans to make a down payment of $4,200.00. If she's to make monthly payments of $525 for the next five years, wha
How did Rome build a strong large empire
Anne Frank Nacherzahlung
jasmine bought 7 yards of fabric. the total cost was $45.63. what was the average cost per yard of the fabric she bought?