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

is Kool-Aid example of a solution
The percentage of the labor force that is jobless and actively looking for work is called the unemployment ratio unemployment line unemployment quota unemployme
Suppose the circumference of a circle is 2 pi what is the area?
why does the body need so many organ systems
All the following were important abolitionists EXCEPT (A) David Walker (B) Frederick Douglass (C) William Lloyd Garrison (D) Sarah Bagley
Which sentence uses possessive personal pronouns correctly? A. Ewan wondered if the keys were his'. B. Their's are the two on the side, by the counter. C. Have
A man-made world event that would affect the labor market would be a(n) _____.
what PEMDAS is this (4+5)78-49
Alice's aunt is 1.72 meters tall Alice's mother is 175 centimeters tall
what is the greatest perimeter of 6 square centimeters