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

 

fund_shirtOrder


Imagine an online business that sells custom shirts such as "CustomInk.com". They have a pricing formula that might look something like this: $11.95 per shirt for the "Hanes Authentic Crewneck Short Sleeve T-Shirt". If you order 25 or more shirts, they might take 10% off of your entire order, and if you order 50 or more shirts, they might take 20% off of your entire order.

Given the number of shirts you would like to buy, return the amount of dollars that it would cost for that order as a decimal number using the formula above.


fund_shirtOrder(1) → 11.95
fund_shirtOrder(25) → 268.875
fund_shirtOrder(50) → 478.0

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

public double fund_shirtOrder(int numShirts) { }

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

Post-solution available

Copyright Nick Parlante 2017 - privacy