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
Q27: In Java, when a character is stored
Q28: What will be the value of bonus
Q29: The boolean expression in an if statement
Q30: What will be displayed after the following
Q31: What will be the value of discountRate
Q33: Java requires that the boolean expression being
Q34: Which of the following statements determines whether
Q35: What will be the value of x
Q36: What will be the value of ans
Q37: What will be displayed after the following
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents