Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
procedure to calulate LCM of three numbers
DECLARE a int:= 3; b int:= 6; c int:= 9; l int:=0; str varchar2(100); function gcd(x int, y int) return int as begin if y = 0 then return x; end if; return gcd(y,mod(x,y)); end; procedure lcm(x in int,y in int, z in int,l out int) as begin l:=x*y/gcd(x,y); l:=l*z/gcd(l,z); end; begin lcm(a,b,c,l); dbms_output.put_line(l); end;
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
record type
a
Patient0021
nago
My PLSQL
TRIGGER
Srinivas
shailendra
prgm1
pagination example
Please log in to post a comment.