Piedra de mayor peso

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

El programa dice cual es la piedra de mayor peso

Copy this code and paste it in your HTML
  1. piedra1 = 40
  2. piedra2 = 12
  4. if piedra1 > piedra2
  5. puts "piedra1 pesa mas"
  6. elsif piedra1 == piedra2
  7. puts "los dos pesan igual"
  8. else
  9. puts"piedra2 es la mayor peso"
  10. end

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.