What would be the value of discountRate after the following statements are executed? double discountRate = 0.0;
Int purchase = 100;
If (purchase > 1000)
DiscountRate = .05;
Else if (purchase > 750)
DiscountRate = .03;
Else if (purchase > 500)
DiscountRate = .01;
A) .05
B) .03
C) .01
D) 0.0
Correct Answer:
Verified
Q12: A block of code is enclosed in
Q21: Enclosing a group of statements inside a
Q22: The expression tested by an if statement
Q25: What will be printed when the following
Q26: What will be the value of charges
Q28: What would be the value of discountRate
Q29: Which of the following is the correct
Q48: Which of the following is the correct
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