Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Numerics;
- class TrailingZeroesInN
- {
- 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("Factorial is: {0}", factN);
- Console.WriteLine("Number of zeros are {0}",n/5);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement