Multiple Choice
What would 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 = .05;
Else
DiscountRate = .04;
Else if (purchase > 750)
If (cust == 'Y')
DiscountRate = .04;
Else
DiscountRate = .03;
Else
DiscountRate = 0;
A) .05
B) .04
C) .03
D) 0
Correct Answer:

Verified
Correct Answer:
Verified
Q1: What will be the value of bonus
Q2: In most editors, you are indenting by
Q3: Which of the following correctly tests the
Q4: This type of operator determines whether a
Q6: In Java, when a character is stored
Q8: What will be the value of ans
Q10: What is the value of ans after
Q13: When testing for character values, the switch
Q16: Which of the following will format 12.78
Q18: A local variable's scope always ends at