Area of circle
733913Nov 12 2009 — edited Nov 12 2009Following code as mentioned below is not working properly( while loop is functional as it should be)......Please suggest solution for this..
1* SELECT * FROM AREA
SQL>
SQL> DECLARE
2 R NUMBER(5,2);
3 AR NUMBER(8,2);
4 Pi CONSTANT NUMBER(3,2):=(22/7);
5 CH VARCHAR2(1);
6 BEGIN
7 CH:='Y';
8 WHILE(CH='Y')
9 LOOP
10 R:=&R;
11 AR:=POWER(R,2)*Pi;
12 INSERT INTO AREA VALUES(R,AR);
13 CH:='&CH';
14 END LOOP;
15 END;/
16 /