Oracle PL/SQL Programming

Tuesday, February 23, 2016

Factorial

set serveroutput on;
declare
i number(5);
j number (5);
f number(10);
begin
i:=&i;
f:=1;
for j in 1..i
loop
f:=f*j;
end loop;
dbms_output.put_line('Factorial of '||i|| ' is '  ||f);
end;
/
Posted by Unknown at 10:55 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: Factorial

No comments:

Post a Comment

Newer Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ▼  2016 (25)
    • ►  March (6)
    • ▼  February (19)
      • cheack whether given number is palindrome or not.
      • Sum of n numbers
      • Fibonacci Series of N term
      • Sum of 10 numbers
      • Fibonacci series
      • Sum of 100 Numbers
      • Greatest of Three Numbers
      • Sum of Odd Numbers using for loop
      • Addition of Two Numbers
      • Locking of PL/SQL
      • VARIABLE DECLARATIONS
      • VARIABLES of PL/SQL
      • Types of constraints
      • Looping Statements / Iterative Statements:
      • Data Constraints
      • Count Prime 1 to 100 in PL/SQL Program
      • AirthematicOperation
      • DECISION STATEMENTS
      • Factorial

About Me

Unknown
View my complete profile
Simple theme. Powered by Blogger.