Answer to Question #258562 in Databases | SQL | Oracle | MS Access for Tarurendra Kushwah

Question #258562

Write a procedure to calculate factorial of a number entered by user.

1
Expert's answer
2021-10-31T12:08:57-0400
Declare
	N numbaer;
	temp number;
	sum numbaer:1;
Begin
	N:=&N;
	temp:=n;
	while temp>0 loop
	sum:=temp*sum;
	temp:=temp-1
end loop;
dbms_output.put_line('Factorial of ||n|| is sum) ;
end;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS