#!/usr/bin/ruby

def sumtotal(x, y, mathop)

puts "Given Math Operation is: "+mathop

puts “X = #{x}”

puts “Y = #{y}”

puts “\n”

if mathop == “+”

z = x + y

elsif mathop == “-”

z = x - y

elsif mathop == “*”

z = x * y

puts(z)

elsif mathop == “/”

z = x / y

else

z = “Invalid Math Operation”

end

return z

end

puts "Enter Math Operation: "

funop = gets()

#puts "Given Math Operation is: "+funop

tot = sumtotal(10,20, funop)

puts “Sum of 2 Number is #{tot}”