Given a number, your task to print the factorial of that number using pl/sql.
Input : 5 Output : 120
5! = 5 * 4 * 3 * 2 * 1 = 120
Input : 4 Output : 24
Basic structure of pl/sql block
declare -- declare all the variables begin -- for start block -- make a program here end -- for end block
The program of factorial of a number in pl/sql is given below:
Output:(if given input as 5)
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.