daily pastebin goal
20%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Espero q esto sea un comentario:
  2.  
  3. puts "Primera Prueba"
  4. puts "suma de dos numeros"
  5. print ('Ingrese un numero entero: ') #esto es tipo C++
  6.   num1=gets.chomp #esperamos al teclado
  7. print ('Ingrese otro numero entero: ') #Idem a c++
  8.   num2=gets.chomp #otra vez esperamos al teclado
  9. suma=num1.to_i+num2.to_i  #to_1 convierte string en integer
  10. puts "el resultado es #{suma}"
  11. #ahi termina todo parece
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top