about | help | code help+videos | done | prefs |
taxRate
Write a method called taxRate that takes salary (double) and returns the correct tax rate (integer). Salaries less than 9,275 have a 10% tax rate. Salaries equal to or above 9,275 but below 37,650 have a 15% tax rate. Salaries equal to or above 37,650 but below 91,150 have a 20% tax rate. Salaries at or above 91,150 but below 190,150 have a 25% tax rate. Salaries at or above 190,150 have a 33% tax rate. taxRate(5000) → 10 taxRate(16123) → 15 taxRate(37650) → 20 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 100 Post-solution available
Copyright Nick Parlante 2017 - privacy