Multiple Choice
What would be the value of discountRate after the following statements are executed?
Double discountRate = 0.0;
Int purchase = 100;
If (purchase > 1000)
DiscountRate = .05;
Else if (purchase > 750)
DiscountRate = .03;
Else if (purchase > 500)
DiscountRate = .01;
A) .05
B) .03
C) .01
D) 0.0
Correct Answer:

Verified
Correct Answer:
Verified
Q27: Programs never need more than one path
Q33: In a switch statement, if two different
Q49: What will be printed when the following
Q50: The expression tested by an if statement
Q51: If you prematurely terminate an if statement
Q52: Because the || operator performs short-circuit evaluation,
Q55: What is the value of x after
Q56: What does the following code display?<br>Int d
Q57: This is a boolean variable that signals
Q59: The switch statement is a:<br>A) Multiple alternative