# quadeval.rb – A simple Ruby program # Input: Four numbers, representing the values of # a, b, c, and x # Output: The value of the expression # a*x**2 + b*x + c # Get input puts "Please input the value of a " a = gets.to_i puts "Please input the value of b " b = gets.to_i puts "Please input the value of c " c = gets.to_i puts "Please input the value of x " x = gets/to_i # Compute and display the result result = a * x ** 2 + b * x + c puts "The value of the expression is: #{result}" }