Advertisement
Guest User

Untitled

a guest
Jan 18th, 2015
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. BigInteger e otgovora:)
  2.  
  3. using System;
  4. using System.Numerics;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9.  
  10. namespace fakt
  11. {
  12.     class fakt
  13.     {
  14.         static void Main(string[] args)
  15.         {
  16.             
  17.             
  18.             Console.Write("Vuvedete n=");
  19.             int n=int.Parse(Console.ReadLine());
  20.             BigInteger faktorial = n;
  21.             for (int i = 1; i < n; i++)
  22.             {
  23.                
  24.                 faktorial = faktorial * (n - i);
  25.                 
  26.                 
  27.             }
  28.             
  29.             Console.WriteLine("Faktorial ot  " + n +"= ");
  30.             Console.WriteLine(faktorial);
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement