Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title> Tabellina Random </title>
- </head>
- <body>
- <h1> Tabellina numero random. </h1>
- <h4> Questa pagina web ci permette di ottenere la tabellina di un numero ottenuto randomicamente tra 1 e 10.</h4>
- <?php
- $num = rand(1,10); // dichiaro variabile
- echo "Il numero ottenuto randomicamente è: $num </br></br>";
- for( $i=0; $i<11; $i++ ) //esegue ciclo for per trovare valori tabella
- {
- $ris = $i*$num;
- echo "<table border=1>
- <td>$num*$i</td><td>$ris</td>";
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement