Advertisement
a_tifonoff

Untitled

Jan 22nd, 2015
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. namespace faktoriel
  2. {
  3.     class Faktoriel
  4.     {
  5.         static void Main(string[] args)
  6.         {
  7.             Console.Write("Въведи число  :");
  8.                  int number = int.Parse(Console.ReadLine());
  9.                  System.Numerics.BigInteger faktoriel = number;
  10.  
  11.                  for (int counter = 1; counter < number; counter++)
  12.                     {
  13.                         faktoriel = faktoriel * counter;        
  14.                     }
  15.                  Console.WriteLine(faktoriel);
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement