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 4</h1></center>
- <form method="get"action=" ">
- Masukkan jumlah bintang yang akan dibuat formasi
- <input type="text" name="jumlah"><br>
- <input type="submit" name="submit" value="submit">
- <input type="reset" name="reset" value="reset"><br>
- <?php
- $jumlah = $_GET[jumlah];
- for ($i=1;$i<=$jumlah;$i++)
- {
- for($m=1;$m<=$i;$m++)
- {
- echo "*";
- }
- echo "<br>";
- }
- ?>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement