id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

sspiege3@schools.nyc.gov methodsintro > getDiscountedBill
prev  |  next  |  chance

Determine the amount of discount a person should receive. If the bill is more than 2000, then the person should receive a $100 discount. If the bill is 2000 dollars or less, the person does not receive a discount of any kind.


getDiscountedBill(4000) → 3900.0
getDiscountedBill(2000) → 2000.0
getDiscountedBill(1000) → 1000.0

...Save, Compile, Run (ctrl-enter)

public double getDiscountedBill(double bill){ }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 100

Copyright Nick Parlante 2017 - privacy