Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- class Program
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int factoriel = 1;
- if (n > 0)
- {
- for (int i = 1; i <= n; i++)
- {
- factoriel = factoriel * i;
- }
- }
- Console.WriteLine($"{factoriel}");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement