-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
721f109
commit d3140ab
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
$C = $_POST["temperatura"]; | ||
|
||
$F = 1.8 * $C + 32; | ||
|
||
echo "A temperatura em graus Fahrenheit é: $F"; | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Conversão de Temperatura</title> | ||
|
||
<meta charset="utf-8"> | ||
</head> | ||
|
||
<body> | ||
<form method="post" action="conversor.php"> | ||
<label>Temperatura (° C)</label><br /> | ||
<input type="number" name="temperatura" /> | ||
<br /><br /> | ||
|
||
<input type="submit" value="Converter" /> | ||
</form> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
$b = $_POST["base"]; | ||
$a = $_POST["altura"]; | ||
|
||
$h = sqrt( pow($a, 2) + pow($b, 2) ); | ||
|
||
echo "Hipotenusa: $h"; | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<head> | ||
<meta charset="utf-8"> | ||
</head> | ||
<body> | ||
|
||
<h1>Cálculo da Hipotenusa</h1> | ||
|
||
<form method="post" action="hipotenusa.php"> | ||
<label>Base</label><br /> | ||
<input type="number" name="base" /> | ||
<br /><br /> | ||
|
||
<label>Altura</label><br /> | ||
<input type="number" name="altura" /> | ||
<br /><br /> | ||
|
||
<input type="submit" value="Calcular Hipotenusa" /> | ||
</form> | ||
</body> | ||
</html> |