Set serveroutput on;
declare
counter NUMBER;
n number := &n;
begin
counter := 0;
for i in 2..n LOOP
for j in 2..i LOOP
if mod(i,j)=0 then
DBMS_OUTPUT.PUT_LINE(i||’ Not a PRIME’);
COUNTER:=1;
exit;
end if;
end loop;
IF (counter = 0) THEN
DBMS_OUTPUT.PUT_LINE(i||’ PRIME’);
END IF;

end loop;
end;

/

 

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

©2023 MYBSCIT.com. An initiative by some failures to make student scholars.

or

Log in with your credentials

Forgot your details?