LJZN

每天更新Rails练习项目到Github~

» Home
» Category
» About Me
» Github

笨方法学Ruby第二十九天

28 Jun 2016 » LRTHW
people = 15
cats = 29
dogs = 10


if people < cats
	puts "Too many cats! The world is doomed!"
end

if people > cats
	puts "Not many cats! The world is saved!"
end

if people < dogs
	puts "The world is drooled on!"
end

if people > dogs
	puts "The world is dry!"
end

if people != dogs
	puts "People are not dogs."
end

dogs += 5

if people >= dogs
	puts "People are greater than or equal to dogs."
end

if people <= dogs
	puts "People are less than or equal to dogs."
end


if people == dogs
	puts "People are dogs."
end

Related Posts