Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DECLARE
- a int := 5;
- s int := 1;
- BEGIN
- while(a>1)
- LOOP
- s:=s*a;
- a:=a-1;
- END LOOP;
- dbms_output.put_line('fact '|| s);
- END;
- a number :=8;
- c number :=0;
- begin
- for i in 2..5
- loop
- if mod(a,i)=0
- then
- c:=c+1;
- end if;
- end loop;
- if c=1
- then
- dbms_output.put_line('prime number');
- else
- dbms_output.put_line('Not a prime number');
- end if;
- end;
Add Comment
Please, Sign In to add comment