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

Can someone help me please
I’m having trouble understanding how to solve this someone please help ASAP thank you! Use the Law of Cosines to solve the problem. You must solve for BC first
Which excerpt from The Odyssey best shows Odysseus demonstrating the epic hero traits of strength and Leadership?
Please give answer It’s for a school work
Who conauered the Hausa states in the 19th century
ways to reduce necluar weapons​
Translate each English phrase in the following problem into an algebraic expression and set up the related equation. Let z be the unknown number. The difference
punishments help comfort your behavior right
Pb + 02 - Pb304 help
The layer of ISO/OSI that enables someone to access network is Options:(a) application(b) data-link(c) physical (d) session ​