Question

3.2: If-else 3.2.4: IFelse statements. ACTIVITY 1) What is the final value of numltems? bonusVal 5; if (bonusVal < 12) numIte
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1) The final value of numItems is 100

Explanation:

bonusVal = 5

if(bonusVal < 12) condition would produce true since 5 < 12 (5 is less than 12).

So if(true) condition passes and numItems value will be 100

2) The final value of numItems is 200

Explanation:

bonusVal = 12

if(bonusVal < 12)condition would produce false since 12 is not less than 12

So if(false) condition fails and numItems value will be 200

Add a comment
Know the answer?
Add Answer to:
3.2: If-else 3.2.4: IFelse statements. ACTIVITY 1) What is the final value of numltems? bonusVal 5;...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT