Skip to content

Commit

Permalink
Exercise 29: What If
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowflash2041 committed Oct 4, 2022
1 parent 1470ca9 commit 2e01e17
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions ex29.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
people = 20
cats = 30
dogs = 15


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


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

0 comments on commit 2e01e17

Please sign in to comment.