J
Jake Alucard
so i'm writing a program for class that tells the user if the person is
20 or under then they get a green and if the person is 21 or over then
tehy get red here's the code and error
age = ageText.to_s
if age <= 20
status = "GREEN"
else
status = "RED"
end
C:/ruby/martinilounge.rb:69:in `<=': comparison of String with 18 failed
from C:/ruby/martinilounge.rb:69
from C:/ruby/martinilounge.rb:98:in `call'
from C:/ruby/martinilounge.rb:98:in `main'
from C:/ruby/martinilounge.rb:98
20 or under then they get a green and if the person is 21 or over then
tehy get red here's the code and error
age = ageText.to_s
if age <= 20
status = "GREEN"
else
status = "RED"
end
C:/ruby/martinilounge.rb:69:in `<=': comparison of String with 18 failed
from C:/ruby/martinilounge.rb:69
from C:/ruby/martinilounge.rb:98:in `call'
from C:/ruby/martinilounge.rb:98:in `main'
from C:/ruby/martinilounge.rb:98