Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace factoriel
- {
- class Program
- {
- static void Main()
- {
- Console.WriteLine(factoriel(10));
- }
- static int factoriel(int n)
- {
- if(n == 2)
- {
- return 2;
- }
- return factoriel(n - 1) * n;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement