Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Numerics;
- class TrailingZeroesInNFact
- {
- static void Main()
- {
- Console.Write("n = ");
- BigInteger n = BigInteger.Parse(Console.ReadLine());
- BigInteger factN = 1;
- for (int i = 1; i <= n; i++)
- {
- factN *= i;
- }
- Console.WriteLine("trailing zeroes of n! = " + (n / 5));
- Console.WriteLine(factN);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement