Advertisement
Katina_

BigFactorial

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