Wednesday, 28 October 2026

PL/SQL Program to Find Factorial of a Number

set serveroutput on;

declare
temp number;
input_num number := &n;
fact_num number  := 1;
begin
temp := input_num;
while(input_num >0)
loop
fact_num := fact_num * input_num;
input_num := input_num -1;
end loop;
dbms_output.put_line('The Factorial of number ' ||temp ||' is : '||fact_num);
end;

No comments:

Post a Comment

AWS Pricing Basics

AWS Pricing Basics: How to Manage Cloud Costs Cloud computing allows businesses to access infrastructure without purchasing all their h...