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;
- using System.Threading.Tasks;
- namespace Factorial
- {
- class Program
- {
- static void Main(string[] args)
- {
- var input = System.Numerics.BigInteger.Parse(Console.ReadLine());
- Console.WriteLine(Factorial(input));
- }
- static System.Numerics.BigInteger Factorial(System.Numerics.BigInteger num)
- {
- if (num == 0) return 1;
- else return num * Factorial(num - 1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement