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

 

siochi@cnu.edu > taxOn
prev  |  next  |  chance

taxOn() -- given an agi (Adjusted Gross Income), return the tax owed. Use the following rules:

  1. If agi is up to $1000  no tax is owed
  2. If agi is greater than $1000 and up to $10,000, the tax is 100.0 plus 10% of the agi over $1000
  3. If agi is greater than $10,000, the tax is 10,000.0

taxOn(0) → 0.0
taxOn(999) → 0.0
taxOn(1000) → 0.0

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

public double taxOn(int agi) { }

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: 180 Post-solution available

Copyright Nick Parlante 2017 - privacy