What will be the value of discountRate after the following statements are executed?
double discountRate = 0.0;
Int purchase = 100;
If (purchase > 1000)
DiscountRate = 0.05;
Else if (purchase > 750)
DiscountRate = 0.03;
Else if (purchase > 500)
DiscountRate = 0.01;
A) 0.0
B) 0.05
C) 0.03
D) 0.01
Correct Answer:
Verified
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
Q38: A flag may have the values
A) defined
Q41: Which of the following is the correct
Q42: What is the value of ans after
Q43: An expression tested by an if statement
Q44: What is the value of x after
Q46: Which of the following expressions will determine
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