Fatorial
fatorial em perl
Descrição
fatorial em perl
#!/urs/bin/perl
#autor : m4rc1054nt05
#date 09-12-2005
#Programa que calcula o fatorial
$c =1;
$fatorial =1;
print "digite o numero que gostaria de calcular: \n";
chomp ( $number = <STDIN> );
while ( $c <= $number ){
$fatorial *= $c;
++$c;
}
print "O fatorial e $fatorial.\n";