Advertisement
BSO90

Untitled

Jun 4th, 2021
1,160
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 N_Factorial
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             int n = int.Parse(Console.ReadLine());
  11.             BigInteger factorial = 1;
  12.             for (int i = 1; i <= n; i++)
  13.             {
  14.                 factorial *= i;
  15.             }
  16.             Console.WriteLine(factorial);
  17.         }
  18.     }
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement