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

Which of the following terms refers to how genetic traits are expressed? A. Display B. Genotype C. Phenotype D. Dominance
How does the width of a rectangle change if the length increases but the area remains 300square feet
Identify the sentence with all words spelled correctly. a. Silvio and​ Lena's marrage ceremony took place on the beach. b. Javier had to renew his​ driver's lic
you have 4 gallons of gas in your car. Your car gets 23 miles per gallon. How many miles can you drive?
In a play, the rising action consists of the events that lead up to the a. last line in the scene b. climax c. external conflict d. internal conflict
Evaluate the expression when r = 8.2 and s = –3.7. r – 2s a. –22.94 b. 0.8 c. 4.5 d. 15.6
report writing about garbage disposal
Soccer is the most popular sport in the United States.
A cliché is a _______ expression. A. worn-out B. foreign C. new D. wordy
five ninths times the difference of f and 32