About 2,800,000 results
Open links in new tab
  1. Find the factorial of a number in pl/sql - GeeksforGeeks

    May 6, 2018 · Given a number, your task to print the factorial of that number using pl/sql. Examples: Basic structure of pl/sql block. begin -- for start block. end -- for end block. The program of factorial of a number in pl/sql is given below: Output: (if given input as 5)

  2. PL/SQL Program to Find Factorial of a Number - The Crazy Programmer

    Here you will get pl/sql program to find factorial of a number. We can calculate factorial of a number by multiplying it with all the numbers below it. For example factorial of 5 = 5 x 4 x 3 x 2 x 1 = 120.

  3. PL/SQL Program to find factorial of a number using function

    Calling the Function: Output. The factorial of 5 is: 120. Check out our other PL/SQL programs examples. Your email address will not be published. Here you will get pl/sql program to find factorial of a number using function.

  4. Creating plsql function for Factorial program - Stack Overflow

    Jan 2, 2019 · create or replace function fact(num in number) return number Is res_fact number:=1; begin for i in 1..num loop res_fact:=res_fact*i; end loop; dbms_output.put_line('Factorial of '||num||' = '||res_fact); return res_fact; end;

  5. How to Calculate Factorial of a number in PL/SQL

    Calculating the factorial of a number involves multiplying the number by all positive integers less than itself. In PL/SQL, you can achieve this using a loop or a recursive function. Here's an example of both approaches:

  6. oracle database - factorial of a number in pl/sql - Stack Overflow

    Mar 13, 2014 · function by_plsql(num number) return number deterministic. is. n number := 0; begin. for i in 1..num loop. n := n + ln(i); end loop; return round(exp(n)); end; So there are two functions with different content. Test query:

  7. PL/SQL CREATE PROCEDURE - factorial - Stack Overflow

    Dec 1, 2021 · Question 1: write a stored procedure that gets an integer number n and calculates and displays its factorial. n NUMBER) AS. factorial NUMBER; num Number; FOR i IN REVERSE 1..n LOOP. num := i - 1; factorial := factorial * num; END LOOP; DBMS_OUTPUT.PUT_LINE (factorial); WHEN OTHERS. THEN DBMS_OUTPUT.PUT_LINE ('Error!'); factorial_number(5);

  8. FACTORIAL OF THE GIVEN NUMBER IN RECURSIVE FUNCTION USING PL/SQL ...

    Get the value of n, factorial to be found. Call the function fact with parameters. Display the factorial of a given number. Stop the program. PROGRAM: Function : SQL> create or replace function fact(n number) 2 return number is 3 begin 4 if n=1 then 5 return 1; 6 else 7 return n*fact(n-1); 8 end if; 9 end fact; 10 / Function created. Main ...

  9. MathUtils Package - Factorial Calculation and Prime Number Check

    Jul 18, 2023 · The MathUtils package in PL/SQL provides procedures and functions for calculating factorial and checking prime numbers. This code snippet showcases the implementation of these mathematical operations using PL/SQL.

  10. PL/SQL Program to Find Factorial of a Number - Code Revise

    Let’s do the PL/SQL Program to Find Factorial of a Number. Factorial are those number which can divide by one or itself only. for example: 6 = 1 * 2 * 3* 4* 5* 6 = 720. DBMS_OUTPUT.PUT_LINE ('Factorial can' t calculated for negative numbers. '); DBMS_OUTPUT.PUT_LINE (' Factorial of 0 is 1. ');

  11. Some results have been removed
Refresh