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

Name the theorem that proves congruence 1-6
can you please help me!
Can someone help me with this please
The present age of Rohan’s father is three times the present age of Rohan. After 5 years, their ages will add to 66 years. What are their present ages? PLZ GUYS
= Br = C Name is 1 , formula is
The United States wanted to acquire the Mexican Cession to
The people had to stay away from Herot for winters .
Sentence Completion In the space provided, write the word. 11.____are immature bone cells that create new bone. 12.____are cells that digest old bone in prepara
Please guy help me I will mark you as brainliest if you give me a good answer !! You are selling candy bars for $2.50 each. The cost of those candy bars was $1.
10. Wei saw a special type of plastic that would melt and become a liquid when it was placed in the sun, but it would not melt when placed under a desk lamp. Wh