create or replace procedure pro_multiplicationTable(n number)is
i number;
j number;
m number;
begin
if(n>0 and (n-trunc(n))=0) then
for i in 1..n loop
for j in 1..i loop
m:=i*j;
dbms_output.put(j||'*'||i||'='||m||chr(9)||chr(9));
end loop;
dbms_output.put_line('');
end loop;
else dbms_output.put_line('你输入的数字不是正整数,所以没有乘法表输出!');
end if;
end;
/
i number;
j number;
m number;
begin
if(n>0 and (n-trunc(n))=0) then
for i in 1..n loop
for j in 1..i loop
m:=i*j;
dbms_output.put(j||'*'||i||'='||m||chr(9)||chr(9));
end loop;
dbms_output.put_line('');
end loop;
else dbms_output.put_line('你输入的数字不是正整数,所以没有乘法表输出!');
end if;
end;
/