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 the tangent ration for LB????
What two views did America’s founding fathers hold
What is the correct balanced chemical equation for reaction of magnesium with molecular oxygen?
List three keywords that refer to addition.
Transcription and translation of the mrna molecule in protein synthesis occurs in two different locations. translation occurs _____.
PLEASE HELP ME WITH THIS ASAP!!! SEE BELOW
A 2kg bowling ball rolls at a speed of 5 m/s on a roof of the building that is 40 meters tall. What is the kinetic energy
Woolly mammoths were grass-eating mammals that resembled elephants but with heavy coats, large tusks, and small ears that made them suited for extremely cold w
what was the source of the great zimbabwe's wealth?
One goal of christian missionaries was to break up multi-family units within native american tribes since these were common in matrilineal societies and gave to