Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <form action="Matei_Cozac.php" method="post">
- Citire:<input type="value" name="$n" />
- <input type="submit">
- </form>
- $nr2=0;
- $nr5=0;
- $i=0 ;
- $x=0;
- for ($i=1; $i<=$n; $i++)
- {$x=$i;
- while ($x%2==0)
- {$x/=2;
- $nr2++;
- }
- while ($x%5==0)
- {$x/=5;
- $nr5++;
- }
- }
- if ( $nr5 < $nr2 ) print $nr5;
- else print $nr2;
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement