declare
begin
for i in 1..100 loop
dbms_output.put_line(i);
end loop;
end;
declare
begin
for i in reverse 1..100 loop
dbms_output.put_line(i);
end loop;
end;
declare
s number:=0;
begin
for i in reverse 1..100 loop
s:=s + i;
end loop;
dbms_output.put_line(s);
end;
declare
s number:=0;
begin
for i in reverse 1..100 loop
if i>50 then
s:=s + i;
end if ;
end loop;
dbms_output.put_line(s);
end;
declare
s number:=0;
begin
for i in reverse 1..100 loop
if i/2=0 then
s:=s + i;
end if ;
end loop;
dbms_output.put_line(s);
end;
declare
s number:=0;
begin
for i in reverse 1..100 loop
if i mod 2=0 then
s:=s + i;
end if ;
end loop;
dbms_output.put_line(s);
end;
declare
odd number:=0;
even number:=0;
begin
for i in reverse 1..100 loop
if i mod 2=0 then
even:=even + i;
else
odd:=odd + i;
end if ;
end loop;
dbms_output.put_line(even);
dbms_output.put_line(odd);
end;
declare
odd number:=0;
even number:=1;
tem number:=0;
begin
dbms_output.put_line(even);
dbms_output.put_line(odd);
for i in reverse 1..8 loop
tem:=odd+even;
dbms_output.put_line(tem);
odd:=even;
even:=tem;
end loop;
end;
begin
for i in 1..100 loop
dbms_output.put_line(i);
end loop;
end;
declare
begin
for i in reverse 1..100 loop
dbms_output.put_line(i);
end loop;
end;
declare
s number:=0;
begin
for i in reverse 1..100 loop
s:=s + i;
end loop;
dbms_output.put_line(s);
end;
declare
s number:=0;
begin
for i in reverse 1..100 loop
if i>50 then
s:=s + i;
end if ;
end loop;
dbms_output.put_line(s);
end;
declare
s number:=0;
begin
for i in reverse 1..100 loop
if i/2=0 then
s:=s + i;
end if ;
end loop;
dbms_output.put_line(s);
end;
declare
s number:=0;
begin
for i in reverse 1..100 loop
if i mod 2=0 then
s:=s + i;
end if ;
end loop;
dbms_output.put_line(s);
end;
declare
odd number:=0;
even number:=0;
begin
for i in reverse 1..100 loop
if i mod 2=0 then
even:=even + i;
else
odd:=odd + i;
end if ;
end loop;
dbms_output.put_line(even);
dbms_output.put_line(odd);
end;
declare
odd number:=0;
even number:=1;
tem number:=0;
begin
dbms_output.put_line(even);
dbms_output.put_line(odd);
for i in reverse 1..8 loop
tem:=odd+even;
dbms_output.put_line(tem);
odd:=even;
even:=tem;
end loop;
end;
reverse....
উত্তরমুছুন