Skip to content

Instantly share code, notes, and snippets.

View greenplastik's full-sized avatar

Alexis M. greenplastik

View GitHub Profile
@greenplastik
greenplastik / test.rb
Created December 24, 2012 05:13
Problem with case statement with range and greater than comparisons
x=40
answer = case x
when x<1 then "400"
when 1...2 then "300"
when 2...4 then "250"
when 4...6 then "150"
when 6...8 then "125"
when 8...10 then "100"
when 10...12 then "92"
when 12...15 then "85"