set serveroutput on declare total int; begin total:=0; for i in reverse 1..10 loop if mod(i,2)=0 then dbms_output.put_line('total:='||total||'+'||i); total:=total+i; end if; end loop; dbms_output.put_line('10以内偶数的和是'||total); end;
set serveroutput on declare total int; begin total:=0; for i in reverse 1..10 loop if mod(i,2)=0 then dbms_output.put_line('total:='||total||'+'||i); total:=total+i; end if; end loop; dbms_output.put_line('10以内偶数的和是'||total); end;