1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Numerics;
namespace ConsoleApp1
{
class Program
{
public static BigInteger Factorial(BigInteger x)
{
if (x <= 1)
return 1;
else
return x * Factorial(x - 1);
}
static void Main(string[] args)
{
BigInteger test1 = new BigInteger("1000", 10);
BigInteger test2 = new BigInteger("1000", 10);
int boucle = 1;
for (boucle=1;boucle<=test1;boucle++)
{
test2 = test2 * boucle;
Console.WriteLine("facto "+boucle+" : "+test2);
}
Console.WriteLine(test2);
Console.ReadLine();
}
}
} |
Partager