Ruby program to multiply given two numbers

Views: 155   

Following program shows you how to multiply given two numbers.
In this program we get inputs from user and multiplies those two inputs

puts "Enter first number:"
 input1 = Integer(gets.chomp)
 puts "Enter second number:"
 input2 = Integer(gets.chomp)
 result = input1 * input2
 puts "Multiplication of given two numbers is: #{result}"


Enetr first number:
Enetr second number:
Multiplication of given two numbers is: 200
On By