kirililchev3

Big Factorial

Jun 13th, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. using System;
  2. using System.Numerics;
  3.  
  4.  
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int n = int.Parse(Console.ReadLine());
  10.             BigInteger result = 1;
  11.  
  12.             for (int i=1; i <= n ;  i++)
  13.             {
  14.                result *= i;
  15.             }
  16.             Console.WriteLine(result);
  17.         }
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment