使用PL/SQL程序输出1~13中所有不是3的倍数的整数数值

declare
b number;
begin
    for x in 1..13 loop
    b:=x/3;

    if instr(b,'.')>0     --判断b是否是整数。若不是整数,则说明x不能被3整除。

    then dbms_output.put_line(x);

    end if;
    end loop;
end;
posted @ 2009-11-28 16:12  是旧卡  阅读(316)  评论(0)    收藏  举报