Posted By


carmen on 07/22/11

Tagged


Statistics


Viewed 54 times
Favorited by 0 user(s)

agrupando orden


/ Published in: Ruby
Save to your folder(s)



Copy this code and paste it in your HTML
  1. def mayorDeEdad(anios)
  2. if anios >= 18
  3. puts " eres mayor de edad "
  4. else
  5. puts " eres un pequeñin "
  6. end
  7.  
  8. if anios >= 70
  9. puts " que mayor estas "
  10. end
  11. end
  12. puts " ¿ cuantos años tienes ? "
  13. anios = gets.chomp.to_i
  14. mayorDeEdad(anios)

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.