What would be the value of discountRate after the following statements are executed?
Double discountRate = 0.0;
Int purchase = 1250;
If (purchase > 1000)
DiscountRate = .05;
If (purchase > 750)
DiscountRate = .03;
If (purchase > 500)
DiscountRate = .01;
Else
DiscountRate = 0;
A) .05
B) .03
C) .01
D) 0
Correct Answer:
Verified
Q32: What is the value of ans after
Q33: If str1 and str2 are both Strings,
Q34: This is a boolean variable that signals
Q35: What would be the value of x
Q36: These operators use two operands:
A) Unary
B) Binary
C)
Q38: What is the value of x after
Q39: What would be the value of discountRate
Q40: What is the value of ans after
Q41: Which of the following is the correct
Q42: The switch statement is a:
A) Multiple alternative
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