What will 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 = 0.05;
else
discountRate = 0.04;
else if (purchase > 750)
if (cust == 'Y')
discountRate = 0.04;
else
discountRate = 0.03;
else
discountRate = 0.0;
```


a. 0.0
b. 0.04
c. 0.05
d. 0.03


b. 0.04

Computer Science & Information Technology

You might also like to view...

Define boxing and unboxing.

What will be an ideal response?

Computer Science & Information Technology

Mobile phones need two frequencies in order for both parties in a conversation to be able to talk and listen at the same time. This is called ________

A) AMPS B) full-duplex C) 800 band D) SID

Computer Science & Information Technology

A(n) ________ row allows the first row to repeat at the top of the next page if the table gets split

Fill in the blank(s) with correct word

Computer Science & Information Technology

A variable defined inside a method is referred to as __________.

a. a global variable b. a method variable c. a block variable d. a local variable

Computer Science & Information Technology