Finding Number of Trailing Zeros in n! C/C++ script

SPONSORED LINKS

    Specification

  • Version:
  • File size: 0 KB
  • File name: snippet109.htm
  • Last update:
  • Platform: Windows / Linux / BSD / Solaris
  • Language: C/C++
  • Price:Freeware
  • Company: born2c0de (View more)

Finding Number of Trailing Zeros in n! script description:




Publisher review:
Finding Number of Trailing Zeros in n! - BASED ON A MATHEMATICAL THEOREM BASED ON A MATHEMATICAL THEOREM: Theorem: Any Number can be represented in a PRIME-POWER form. For Example, 100! can be written as follows: 100! = 2^a * 3^b * 5^c * 7^d .....(prime numbers till 100) where a,b,c,d etc. are variable powers.

Since a Trailing ZERO can be created only by a 2 and 5 (2 * 5=10) we calculate the powers of 2 and 5. Since 2 can be obtained by a lot more other ways: 2,4,6,8 we always end up with a lot of values. Since 5 is unique and cannot be created we just calculate the power of 5 using the Formula: nEp = n/(p^1) n/(p^2) n/(p^3) ... as long as p^x is
Finding Number of Trailing Zeros in n! is a C/C++ script for Snippets scripts design by born2c0de. It runs on following operating system: Windows / Linux / BSD / Solaris.

Operating system:
Windows / Linux / BSD / Solaris

Latest script and internet news

222

222

22

Posted on: 18 Jul 2023 22:27 by A. Brown

111

111

111

Posted on: 18 Jul 2023 22:24 by A. Brown

The permanently active Push system offered by the new Google Chrome 42

The permanently active Push system offered by the new Google Chrome 42

Hacked By !Sc-sT

Posted on: 17 Mar 2015 07:57 by A. Brown

SPREAD THE WORD

User Rating


Rating: 2.2 out of 5
Based on 13 ratings. 13 user reviews.

  • Currently 2.15 out of 5
  • 1
  • 2
  • 3
  • 4
  • 5