PL/SQL Calculate the Area of a Circle
Here you will learn pl/sql program to calculate the area of a circle in pl/sql programming.
PL/SQL Calculate the Area of a Circle
1 2 3 4 5 6 7 8 9 | DECLARE radius NUMBER; area NUMBER; pi CONSTANT NUMBER := 3.14159; BEGIN radius := &radius; -- Prompts to input radius area := pi * radius * radius; DBMS_OUTPUT.PUT_LINE('The area of the circle is: ' || area); END; |
Output
Enter value for radius : 10
The area of the circle is: 314.159
Check out our other PL/SQL programs examples