Take two inputs from user and check whether they are equal or not.
puts"Enter first number"first=gets.chomp.to_iputs"Enter second number"second=gets.chomp.to_iputsfirst==second
2.
Take 3 inputs from user and check : all are equal any of two are equal ( use && || )
puts"first number"first=gets.chomp.to_iputs"second number"second=gets.chomp.to_iputs"third number"third=gets.chomp.to_iall=first==second&&second==third&&third==firstputs"All are equal : #{all}"any=first==second||second==third||third==firstputs"Any of three are equal: #{any}"
3.
Take two number and check whether the sum is greater than 5, less than 5 or equal to 5.
puts"Enter first number"first=gets.chomp.to_iputs"Enter second number"second=gets.chomp.to_isum=first+secondputs"Sum is greater than 5 : #{sum>5}"puts"Sum is equal to 5 : #{sum==5}"puts"Sum is lesser than 5 : #{sum<5}"