Advertisement
Aborigenius

BigInteger/Factorial

Aug 18th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. using System;
  2. using System.Numerics;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace BIGFactorial
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14. int n = int.Parse(Console.ReadLine());
  15.  
  16. BigInteger result = 1;
  17.  
  18.  
  19. for (int i = 1; i <= n; i++)
  20. {
  21. result *= i;
  22. }
  23.  
  24. Console.WriteLine(result);
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement