Run Code
|
API
|
Code Wall
|
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
DECODE() example
testElham
PL/SQL Control Statements
query
Srinivas
Nested loops
Srinivas
admt
regexp example
wq1