puts "Enter degree of angle:"
measure = gets.chomp.to_i
if measure == "180".to_i then puts "That's a straight angle."
if measure == 181..359.to_i then puts "That's an obtuse angle."
if measure == 91..179.to_i then puts "That's an obtuse angle."
if measure == "90".to_i then puts "That's a right angle."
if measure < 90.to_i then puts "That's an acute angle."
if measure == "360".to_i then puts "That's a circle..."
else puts "That's an invalid measurement."
end
end
end
end
end
end
This seems like it should work, but sometimes it doesn't. Help?
--
Posted via http://www.ruby-forum.com/.