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 it ethical to use selective breeding of farm animals for agriculture
Which two sentences correctly describe copyright laws related to design solutions? In the United States, copyright is granted automatically once a work is creat
what werr three key provisions of the treaty of paris
what is the equation of a line passing through (-3,7) and having slope -5
The first bookshelf in the science fiction section of a library can hold 2 comma 768 books. The bookshelf has 8 shelves. Each shelf can hold the same number of
I need help with this please
2x+5x+344x whats the answer
Solve the equations. \sqrt(y^(4)+2y^(2)+1)=y^(2)+1
15mminus​(minus5mminus4​)
solve using elimination -5x+7y=-1 9x-7y=-15