Advertisement
gospod1978

Object and Class/Big Factorial

Oct 24th, 2019
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.51 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. using System.Text.RegularExpressions;
  6. using System.Globalization;
  7. using System.Numerics;
  8.  
  9. namespace fundamental14
  10. {
  11.     class MainClass
  12.     {
  13.         public static void Main()
  14.         {
  15.  
  16.             int n = int.Parse(Console.ReadLine());
  17.             BigInteger f = 1;
  18.             for (int i = 2; i <= n; i++)
  19.             {
  20.                 f *= i;
  21.             }
  22.  
  23.             Console.WriteLine(f);
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement