Skip to content

Instantly share code, notes, and snippets.

@marciojrtorres
Created August 5, 2013 20:35
Show Gist options
  • Save marciojrtorres/6159380 to your computer and use it in GitHub Desktop.
Save marciojrtorres/6159380 to your computer and use it in GitHub Desktop.
Função que falha condicionalmente
def teste(idade)
if idade.to_i >= 18
print "maior de idade: ", idade, " anos"
else
print "menor de idade: ", idde, " anos"
end
end
print "digite um número: "
idade = gets
teste(idade)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment