0
Can anyone tell me how to use two gets method in the same program..
puts "ENTER A NUMBER : " num1 = gets chomp puts "ENTER ANOTHER NUMBER : " num2 = gets.chomp puts (num1 + num2)
11 ответов
+ 2
Above in 2nd line gets chomp must be gets.chomp
+ 2
puts "ENTER A NUMBER : "
num1 = gets.chomp
puts "ENTER ANOTHER NUMBER : "
num2 = gets.chomp
puts (num1 + num2)
+ 2
Now try it
+ 2
Had you copied same code as i had given
+ 2
Bro actually your code is correct there only one(. ) is missing in 2nd line of code
num1=gets.chomp
+ 1
Ok
+ 1
Ok
0
Raj Kalash Tiwari can you plz write the code and message it to me as i cannot understand this
0
Sorry it is showing an error
0
Yes i had copied the same
0
Thanks for ypur opinion now i have done it