Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Factorial
- {
- class Program
- {
- static void Main(string[] args)
- {
- var n = int.Parse(Console.ReadLine());
- var f = 1;
- do
- {
- f= f * n;
- n--;
- } while (n > 1);
- Console.WriteLine(f);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement