Ruby program to find the area of the circle

bookmark


area = 3.14 * radius * radius;

print "Area of circle: ",area

 


Output:

Enter radius: 1.2
Area of circle: 3.14