Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n, sum = 1;
- n = int.Parse(Console.ReadLine());
- for (; n > 0; n--)
- {
- sum = sum * n;
- }
- Console.WriteLine(sum);
- Console.ReadLine();
- }
- }
- }
Add Comment
Please, Sign In to add comment