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

Does mars have an atmosphere at night
whats 30% of $38,366.77??
what is the mean of 6 and 4
Which of the following is NOT a NGO, a Non-governmental Organization? Red Cross? United Nations?International Children's Education Fund? World Court?
1. y=x-1 y= -x + 3 Solve the system of linear equations by graphing
Think of a favorite story. How does the writer let you know what’s going on? Consider the beginning, and explain how the writer introduces the characters, setti
QUESTION 4 Your patient has a left-sided BKA (below the knee amputation). Where would you put the LL lead in a 12-lead ECG?
An estimated 3 out of every 25 men are left-handed. What percent of men are left-handed?
what is -75/12 written as a decimal
In what city did the British and the Americans sign a peace treaty?