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

How is a reservoir different from other kinds of lakes?
What is the best way to organize long pieces of writing such as research papers? Formal outlining, brainstorming, free writing
Which sequence shows the different types of electromagnetic waves arranged in an increasing order of their frequency? A.)radio waves, microwaves, visible ligh
Put -0.615, -5/8. -0.62 in order
Classify the triangle by its sides the lengths of the sides are 6,8,and 8
need help with number 18 please
Which property of equality justifies the following statement? "If y-4= 6 then y= 10" A. Addition property of equality B. Multiplication property of equality C.
What is Naturalization laws and regulations
Find the inverse for 43 modulo 660
What do we call 2or more substances bonded together that have properties different from the elements that make them up