Advertisement
Sim0o0na

Untitled

Jan 8th, 2017
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Factorial
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             var n = int.Parse(Console.ReadLine());
  10.             var f = 1;
  11.             do
  12.             {
  13.                 f= f * n;
  14.                 n--;
  15.             } while (n > 1);
  16.             Console.WriteLine(f);
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement