oracle程序包或函数处于无效状态
createorreplacefunctionmyfun(xnumber)returnvarcharassushuvarchar(100);begincnumber:=0...
create or replace function myfun(x number)
return varchar as sushu varchar(100);
begin
c number := 0;
i number := 2;
while i < a
loop
if mod(x,i) =0 then
c := c+1;
exit;
end if;
i := i + 1;
end loop;
if c = 1 then
sushu := '不是素数';
else
sushu :='是素数';
end if;
return sushu;
end;
create or replace function myfun(x number)
return varchar as sushu varchar(100);
begin
c number := 0;
i number := 2;
while i < x
loop
if mod(x,i) =0 then
c := c+1;
exit;
end if;
i := i + 1;
end loop;
if c = 1 then
sushu := '不是素数';
else
sushu :='是素数';
end if;
return sushu;
end; 展开
return varchar as sushu varchar(100);
begin
c number := 0;
i number := 2;
while i < a
loop
if mod(x,i) =0 then
c := c+1;
exit;
end if;
i := i + 1;
end loop;
if c = 1 then
sushu := '不是素数';
else
sushu :='是素数';
end if;
return sushu;
end;
create or replace function myfun(x number)
return varchar as sushu varchar(100);
begin
c number := 0;
i number := 2;
while i < x
loop
if mod(x,i) =0 then
c := c+1;
exit;
end if;
i := i + 1;
end loop;
if c = 1 then
sushu := '不是素数';
else
sushu :='是素数';
end if;
return sushu;
end; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询