Answer to Question #317253 in Java | JSP | JSF for Brian

Question #317253

Suppose that score is an int variable. Consider the following if statements: if (score >= 90);


System.out.println("Discount = 10%");


a. What is the output if the value of score is 95? Justify your answer.


b. What is the output if the value of score is 85? Justify your answer.



1
Expert's answer
2022-03-24T07:49:08-0400

a. Output is Discount = 10%. Because 95>90 and this if return true and perform the line below.

b. Output return nothing. Because 85<90 and this if return false since we do not have else returns nothing.



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS