Last active
August 29, 2015 14:10
-
-
Save dcki/076c6cf2326e9e14f2cd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tax_modifier = 0.015 | |
tax = 0.6 | |
after_tax = 400000.0 | |
while tax >= 0 do | |
if after_tax > 35000.0 | |
income = after_tax / (1.0 - tax) | |
else | |
tax = 0.0 | |
income = after_tax | |
end | |
puts sprintf("%3s %-8s %-8s", "%.0f%%" % (100 * tax), "$%.0f" % income, "$%.0f" % after_tax) | |
tax -= tax_modifier | |
after_tax -= 10000.0 | |
end |
Author
dcki
commented
Nov 28, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment