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

In 1763 the border between Spanish and British land was the _____ River.
When Baking, Would You DIFFUSE Sugar To Double A Recipe?
Investigation: how does temperature affect respiration rates of fish? answers
How many solutions can be found for the equation −4x − 11 = 2(x − 3x) + 13? (4 points) none or one or two or infinitrly many
Which was important part of New England's economy by the 1660's?
Which of the following is the best title for this Informative speech
Buy new $13.97 qty: free shipping for prime members temporarily out of stock. why wait? try the kindle edition instead and start reading now. order now and w
What is the volume of a cylinder with a diameter of 12 in. and a height of 7 in.?
What are units in words
How does Creon justify treating the brothers so differently after their deaths?