Top Posters
Since Sunday
New Topic  
Eels Eels
wrote...
Posts: 716
Rep: 0 0
7 years ago
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) 0.01
B) 0.03
C) 0.05
D) Cannot tell from code
Textbook 
Starting Out with Java: Early Objects

Starting Out with Java: Early Objects


Edition: 4th
Author:
Read 175 times
3 Replies
Replies
Answer verified by a subject expert
ToothyToothy
wrote...
Top Poster
Posts: 744
Rep: 4 0
7 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here
1

Related Topics

Eels Author
wrote...
7 years ago
This helped so much
wrote...
7 years ago
Cheers dude
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1255 People Browsing
Related Images
  
 162
  
 64
  
 92
Your Opinion
Who will win the 2024 president election?
Votes: 3
Closes: November 4

Previous poll results: Where do you get your textbooks?