Ruby program to find the arctangent of the given value

bookmark

print "Enter value: ";
value = gets.chomp.to_f;  

result = Math.atan(value);
print "Arctangent is: ",result;

 


Output:

Enter value: 0.5
Arc Tangent is: 0.4636476090008061