aulinha
This commit is contained in:
66
aula6.php
Normal file
66
aula6.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="pt-br">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Aula 6</title>
|
||||
<link rel="stylesheet" href="estilo.css">
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header><h1>Aula 6</h1></header>
|
||||
<nav></nav>
|
||||
<main>
|
||||
<form action="aula6.php" method="POST">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Início:</td>
|
||||
<td><input type="number" name="ini" ></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fim:</td>
|
||||
<td><input type="number" name="fim" ></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="reset" value="Limpar"></td>
|
||||
<td><input type="submit" name="Enviar"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
if(isset($_POST["ini"])){
|
||||
$ini = $_POST["ini"];
|
||||
}
|
||||
else{
|
||||
$ini = null;
|
||||
}
|
||||
if(isset($_POST["fim"])){
|
||||
$fim = $_POST["fim"];
|
||||
}
|
||||
else{
|
||||
$fim = null;
|
||||
}
|
||||
if($ini != null and $fim != null){
|
||||
$x = $ini;
|
||||
while($x <= $fim){
|
||||
$y = 1;
|
||||
while($y <= 10){
|
||||
$z = $x * $y;
|
||||
echo"<p>$x X $y = $z</p>";
|
||||
$y++;
|
||||
}
|
||||
$x++;
|
||||
echo"<br><br>";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</main>
|
||||
<footer><h1>Programação WEB II - Prof James Willian</h1></footer>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user