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
Q24: What would be the value of discountRate
Q25: What will be printed when the following
Q26: What will be the value of charges
Q29: Which of the following is the correct
Q30: What is the value of ans after
Q31: What will be printed when the following
Q32: Which of the following will format 12.78
Q44: What is the value of x after
Q49: What would be the value of discountRate
Q54: If str1 and str2 are both Strings,
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