Advertisement
ini_PlayeR

Tugas 4 BAB 9 Statement FOR

Mar 24th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. <html>
  2. <head>
  3.     <title>Statement FOR</title>
  4. </head>
  5.  
  6. <body>
  7. <center><h1>Tugas 4</h1></center>
  8.  
  9. <form method="get"action=" ">
  10.     Masukkan jumlah bintang yang akan dibuat formasi
  11.     <input type="text" name="jumlah"><br>
  12.     <input type="submit" name="submit" value="submit">
  13.     <input type="reset" name="reset" value="reset"><br>
  14.  
  15. <?php
  16. $jumlah = $_GET[jumlah];
  17. for ($i=1;$i<=$jumlah;$i++)
  18. {
  19.     for($m=1;$m<=$i;$m++)
  20.     {
  21.         echo "*";
  22.     }
  23.     echo "<br>";
  24. }
  25. ?>
  26. </form>
  27. </body>
  28. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement