Posted By

solhelios on 07/18/11


Tagged

ruby


Versions (?)

How to control de age in yout programs


 / Published in: Ruby
 

A program fronm controlate your programs with dea age

  1. def mayorDeEdad(anios)
  2. if anios >= 18
  3. puts "Gandeee!!"
  4. else
  5. puts "Enanin!!"
  6. end
  7. end
  8. puts "Cuantos aƱos tienes?"
  9. anios = gets.chomp.to_i
  10. mayorDeEdad(anios)

Report this snippet  

You need to login to post a comment.