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).03
b).05
c) 0
d).04
+2
Answers (1)
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “What would be the value of discountRate after the following statements are executed? double discountRate = 0.0; int purchase = 1250; char ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Home » Computers & Technology » 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 =.