Skip to content

Instantly share code, notes, and snippets.

@jrunning
Created June 28, 2016 05:31
Show Gist options
  • Save jrunning/df00de328d53a2a5b67db96616a8f870 to your computer and use it in GitHub Desktop.
Save jrunning/df00de328d53a2a5b67db96616a8f870 to your computer and use it in GitHub Desktop.
# This...
if x == y and y == z
puts "This triangle is equilateral"
else
if x == y or y == z or x == z
puts "This triangle is isoceles"
else
if x != y and y != z and x != z
puts "this triangle is scalene"
end
end
end
# ...is not the same as this...
if x == y and y == z
puts "This triangle is equilateral"
elsif x == y or y == z or x == z
puts "This triangle is isoceles"
elsif x != y and y != z and x != z
puts "this triangle is scalene"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment