Skip to content

Instantly share code, notes, and snippets.

@krokrob
Created January 7, 2016 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krokrob/38919e3d73ed3fb484bc to your computer and use it in GitHub Desktop.
Save krokrob/38919e3d73ed3fb484bc to your computer and use it in GitHub Desktop.
#condition
puts "Quelle température fait-il?"
print ">"
temp = gets.chomp.to_i
# def is_cool?(temp, ceil)
# return temp <= ceil
# end
# puts is_cool?(temp, 24)
#puts "il fait chaud" if temp > 19
answer = temp > 19 ? "il fait chaud" : "il fait frais"
puts answer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment