Created
April 27, 2016 02:04
-
-
Save charmainetham/692be64ccaee9271f6fd4f779abc734b to your computer and use it in GitHub Desktop.
CODEYOUROWN
This file contains 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
def total (colornum, length, height) | |
@length = length | |
@colornum = colornum | |
@height = height | |
tax = 1.15 | |
if colornum <= 2 | |
(colornum*10 + length*height*15)*tax | |
else | |
(colornum*15 + length*height*15)*tax | |
end | |
end | |
puts "your total is #{total(1,1,1)}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment