/ Published in: Ruby
este programa te dice si eres mayor o menor de edad
Expand |
Embed | Plain Text
def mayorDeEdad (anios) if anios >= 18 puts "ERES MAYOR DE EDAD!!!" else puts "NO ERES MAYOR DE EDAD!" end end puts "Escribe tu edad" edadescrita = gets.chomp.to_i mayorDeEdad(edadescrita)
You need to login to post a comment.
