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

all numbers that give 62.8 when truncated to 1 decimal place
who was the resident of usa in1983
There are 20 math problems divided into 4 equal columns on a worksheet. Your teacher has you cross out one column of problems. Use the equation 20-20/ 4=p to fi
I NEED HELPPO NOWWW PLEASEEE!!
how many angels are in right angle name them
What are the main causes of Florida residents' preference for paint powder coating?
Decide whether the ordered pair (-1,4) is a solution of the equation 8x−2y=3.
Which client statement indicates knowledge deficit r/t substance use disorder?a) Although legal, alcohol is one of most widely used drugsb) Tolerance to heroin
If f(x)=3x2-5 and g(x) =-2x+5, then f(3)g(3)=?
1. Phionah poured 100cm³ of water. Phionah later mixed 400cm³ of salt solution of density 1.6gcm3 in the water above. Determine the density of the mixture​