Multiple Choice
What will be the value of discountRate after the following statements are executed?
double discountRate = 0.0;
Int purchase = 1250;
Char cust = 'N';
If (purchase > 1000)
If (cust == 'Y')
DiscountRate = 0.05;
Else
DiscountRate = 0.04;
Else if (purchase > 750)
If (cust == 'Y')
DiscountRate = 0.04;
Else
DiscountRate = 0.03;
Else
DiscountRate = 0.0;
A) 0.0
B) 0.04
C) 0.05
D) 0.03
Correct Answer:

Verified
Correct Answer:
Verified
Q19: All it takes for an OR expression
Q20: What will be the value of pay
Q21: If you prematurely terminate an if statement
Q22: The boolean expression in an if statement
Q23: In Java, when a character is stored
Q25: _ operators are used to determine whether
Q26: What will be the value of discountRate
Q27: Programs never need more than one path
Q28: A block of code is enclosed in
Q29: What is the value of ans, x,