/*Output 1/*
DECLARE
A NUMBER :='&FIRSTNO.';
BEGIN
FOR X IN 1..A
LOOP
FOR Y IN 1..X
LOOP
DBMS_OUTPUT.PUT(Y || ' ');
END LOOP;
DBMS_OUTPUT.NEW_LINE( );
END LOOP;
END;
/*Output 2/*
DECLARE
A NUMBER :='&FIRSTNO.';
BEGIN
FOR X IN 1..A
LOOP
FOR Y IN 1..X
LOOP
DBMS_OUTPUT.PUT(X || ' ');
END LOOP;
DBMS_OUTPUT.NEW_LINE( );
END LOOP;
END;
/
/*Output 3/*
DECLARE
A NUMBER :='&FIRSTNO.';
BEGIN
FOR X IN REVERSE 1..A
LOOP
FOR Y IN 1..X
LOOP
DBMS_OUTPUT.PUT(X || ' ');
END LOOP;
DBMS_OUTPUT.NEW_LINE( );
END LOOP;
END;
/
/*Output 4/*
DECLARE
A NUMBER :='&FIRSTNO.';
BEGIN
FOR X IN REVERSE 1..A
LOOP
FOR Y IN 1..X
LOOP
DBMS_OUTPUT.PUT(X || ' ');
END LOOP;
DBMS_OUTPUT.NEW_LINE( );
END LOOP;
END;
/
Tuesday, March 24, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment