Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title> Таблица сложения </title>
- </head>
- <body>
- <table border=1>
- <form name="authForm" method="GET">
- Введите основание системы счисления:<br>
- <input type="text" size=10px name="basis">
- <input type="submit">
- </form>
- <hr>
- <?php
- $basis = $_GET["basis"] ?? 10;
- for ($i = 0; $i < $basis; $i++) {
- echo "<tr>";
- for ($j = 0; $j < $basis; $j++) {
- echo ("<td align=center>");
- echo strtoupper(base_convert($i + $j, 10, $basis));
- echo "</td>";
- }
- echo ("</tr>");
- }
- ?>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement