Advertisement
aguz99

logic2-2.php

Aug 1st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. <?php
  2. $soal = 'Soal 2';
  3. include '../functions.php';
  4. include 'tplLogic2.php';
  5.  
  6. if (isset($_POST)) {
  7.     $r = $_POST['range'];
  8.  
  9.     echo "<table>";
  10.     for($y=1;$y<=$r;$y++) {
  11.         echo "<tr>";
  12.         for($x=1;$x<=$r;$x++) {
  13.             if ($x == $r-($y-1)) {
  14.                 td($x*2-2);
  15.             } else {
  16.                 td();
  17.             }
  18.         }
  19.         echo "</tr>";
  20.     }
  21.     echo "</table>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement