MuffinMonster

Class Task 22#

Oct 28th, 2013
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             int n, sum = 1;
  13.             n = int.Parse(Console.ReadLine());
  14.             for (; n > 0; n--)
  15.             {
  16.                 sum = sum * n;
  17.             }
  18.             Console.WriteLine(sum);
  19.             Console.ReadLine();
  20.         }
  21.     }
  22. }
Add Comment
Please, Sign In to add comment