Advertisement
Guest User

Untitled

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