Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Statement FOR</title>
- </head>
- <body>
- <center><h1>Tugas 5</h1></center>
- Berikut tampilan semua pasangan nilai x, y, dan z yang memenuhi persamaan x + y + z = 25. Dengan x, y, dan z adalah bilangan asli.<br><br>
- <?php
- for ($x=1;$x<=23;$x++)
- {
- {
- for($y=1;$y<=23;$y++)
- {
- for($z=1;$z<=23;$z++)
- {
- if($x+$y+$z == 25)
- {
- echo "x= ".$x."y= ".$y."z= ".$z."<br>";
- }
- }
- }
- }
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement