Here you will get python program to add two numbers.
The program will first ask user to enter two numbers, calculate their sum and finally print it.
How do you sum numbers in Ruby?
1 2 3 4 5 6 7 8 9 | puts "Enter the first number: " num1 = gets.chomp.to_i puts "Enter the second number: " num2 = gets.chomp.to_i sum = num1 + num2 puts "Sum is: #{sum} " |
Output: