[ create a new paste ] login | about

Link: http://codepad.org/ribOo6ds    [ raw code | output | fork ]

appunti2 - Perl, pasted on Apr 29:
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl
#
# Il numero di partenza viene fornito come costante.
#
$input = 11;
$numero = $input;
for ($cont = 1; $cont < $input; $cont++)
  {
    $numero *= $cont;
  }
print "Il fattoriale è $numero.\n";


Output:
1
Il fattoriale è 39916800.


Create a new paste based on this one


Comments: