Advertisement
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;
- using System.Threading.Tasks;
- using System.Numerics;
- namespace SomeFactorials
- {
- class SomeFactorials
- {
- static void Main()
- {
- int i, number;
- Console.WriteLine("Enter a number to find the factorials");
- number = int.Parse(Console.ReadLine());
- BigInteger fact = number;
- for (i = number - 1; i >= 1; i-- )
- {
- fact = fact * i;
- }
- Console.WriteLine("Factorial of the given number is: {0}", fact);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement