I wrote this program that will ask the user to give a number and then the program will compute the factorial value of the given number using PERL as my programming language.
My website is http://www.jakerpomperada.com
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.
Here in Bacolod City I also accepting computer repair, networking and Arduino Project development at a very affordable price.
Sample Program Output
Program Listing
# factorial.pl
# Author : Jake Rodriguez Pomperada,MAED-IT
# Date : October 31, 2019 4:54 AM Thursday
print "\n\n";
print "\tFactorial Solver in PERL";
print "\n\n";
print "\tEnter a Number : ";
chomp($n =<>);
$i = 1;
$fact = 1;
for ($i=1; $i<=$n; $i++) {
$fact = $fact * $i;
}
print "\n";
print "\t$n! = $fact";
print "\n\n";
print "\tEnd of Program";
No comments:
Post a Comment