prime_or_not
Sun May 26 2024 17:23:54 GMT+0000 (Coordinated Universal Time)
Saved by
@signup
declare
a integer:=&a;
c integer:=0;
i integer;
begin
for i in 2 .. a-1
loop
if (mod(a,i)=0) then
c:=c+1;
end if;
end loop;
if c=0
then
dbms_output.put_line('Prime number');
else
dbms_output.put_line('Not Prime Number');
end if;
end;
/
content_copyCOPY
Comments