print "Enter a number: ";
$n=<STDIN>;
$t=$n;
$i=0;
$f=1;
while($i<$t)
{
$f=$f*$n;
$n--;
$i++;
}
print "Factorial is $f\n";
$n=<STDIN>;
$t=$n;
$i=0;
$f=1;
while($i<$t)
{
$f=$f*$n;
$n--;
$i++;
}
print "Factorial is $f\n";
www.studycsengg.gq
Copyright © Study CS Engg 2015. All rights reserved. Designed By Templateism | MyBloggerLab
0 comments:
Post a Comment