Advertisement
Spocoman

02. Big Factorial

Mar 2nd, 2022
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 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 num = int.Parse(Console.ReadLine());
  11.  
  12.             BigInteger factorial = 1;
  13.  
  14.             for (int i = 1; i <= num; i++)
  15.             {
  16.                 factorial *= i;
  17.             }
  18.             Console.WriteLine(factorial);
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement