Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class FactorielZeros
- {
- static void Main()
- {
- Console.Write("n = ");
- int n = int.Parse(Console.ReadLine());
- int j = 5;
- int nulls = 0;
- for (int i = 1; j > 1 ; i++)
- {
- j = n/ (int)Math.Pow(5 , i);
- nulls += j;
- }
- Console.WriteLine("In {0}! have {1} nulls" , n , nulls);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment