/ Published in: Ruby

Es un conversor de euros a pesetas. Ejemplo de funciones en Ruby
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
def pesetas_euro(pesetas) return pesetas / 166.386 end puts "Introduzca el numero de pesetas" numero_jugador = Integer(gets.chomp) resultado = pesetas_euro(numero_jugador) puts "#{numero_jugador} pesetas son #{resultado}"
Comments
