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

what happens in romeo and juliet
what is the solution to the equation [tex]2x - 7 = 6x + 1[/tex]​
elements, compounds, and mixtures​
Show that cos3(B)+cos(B)sin2(B) = 1 sin(B)cos2(B)+sin3(B) tan(B)
X +6= 10 what does x =​
What is the solution to the linear equation? 를 글 - + 5 - X 6 x = -5 Ox= 0 x= Ox=5
In Passage 1, the reference to "bonds" (line 5) mainly serves to A insert a personal opinion into an otherwise objective discussion of social rights. B suggest
Please help me with this
Select the correct graph for the function ƒ(x) = –x – 7.
20 points!!! referring to your notes and the provided documents, write a two to three paragraph essay that describes how the primary-sources from Task 1 make th