Solved

Create an If Statement That Will Check If the Variable

Question 25

Essay

Create an if statement that will check if the variable salesAmt is greater than the constant SALES_QUOTA. If true, create a block statement that will calculate salesAmt * BONUS_PERCENT and store the result in a variable named bonusPay. The block statement will then compute totalPay by adding salesAmt to bonusPay. Outside of the if structure, add a println statement that will output the totalPay value.

Correct Answer:

verifed

Verified

if(salesAmt > SALES_QUOTA)
{
b...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions