Pertemuan 1: Output
Pertemuan 1: Output
NIM : A11.2018.11590
Kelompok : A11.4401U
PERTEMUAN 1
Output :
Coding :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
echo "<table>";
echo "</table><br>";
$uts=70;
$uas=80;
$tgs=90;
$prosenuts = (0.2*$uts);
$prosenuas = (0.35*$uas);
$prosentgs = (0.45*$tgs);
$hasil= ($prosenuts+$prosentgs+$prosenuas);
{
$hasilhrf = "A";
$hasilhrf = "B";
$hasilhrf = "C";
$hasilhrf = "D";
else
$hasilhrf = "E";
echo "<table>";
echo "</table>";
$biner = "0";
$oktal = "0";
$hexa = "0";
$celcius = 0;
$celcius2 = 0;
$celcius3 = 0;
$celcius4 = 0;
$fahrenheit = 0;
$fahrenheit2 = 0;
$fahrenheit3 = 0;
$fahrenheit4 = 0;
$kelvin = 0;
$kelvin2 = 0;
$kelvin3 = 0;
$kelvin4 = 0;
$reamur = 0;
$reamur2 = 0;
$reamur3 = 0;
$reamur4 = 0;
$input = 0;
if(isset($_POST["huruf"]))
$huruf = $_POST["huruf"]; #fungsi untuk memasukan inputan dari form html ke PHP
$huruf2 = $_POST["huruf"]; #fungsi untuk memasukan inputan dari form html ke PHP
$huruf3 = $_POST["huruf"]; #fungsi untuk memasukan inputan dari form html ke PHP
do
$hasilbagi = $huruf%2;
$biner .= (String)$hasilbagi;
$huruf = intval($huruf/2); #fungsi agar pembagian tidak koma
}while($huruf != 0);
do
$hasilbagi = $huruf2%8;
$oktal .= (String)$hasilbagi;
}while($huruf2 != 0);
//$oktal .= (String)$huruf2;
do
switch($hasilbagi)
default: break;
}$huruf3 = intval($huruf3/16);
}while($huruf3 != 0);
$hexa = strrev($hexa);
if(isset($_POST["value"]))
$input = $_POST["value"];
$celcius = $input;
$fahrenheit = (1.8*$input)+32;
$input = $_POST["value"];
$celcius2 = 1.25*$input;
$fahrenheit2 = (2.25*$input)+32;
$reamur2 = $input;
$kelvin2 = 273+(1.25*$input);
}
$input = $_POST["value"];
$celcius3 = (5*($input-32))/9;
$fahrenheit3 = $input;
$reamur3 = (4*($input-32))/9;
$input = $_POST["value"];
$fahrenheit4 = ($input*1.8)-459.67;
$reamur4 = (0.8*$input)-273;
$kelvin4 = $input; }
?>
<table>
</table><br>
<button type="submit">Cek!</button>
</form>
<br>
<table border="1">
</table>
<table>
</table><br>
<table>
<tr><td><label>Ke Celcius </label></td><td><input type="checkbox" name="suhu1"
value="cl"></td></tr>
</table>
<button type="submit">Cek!</button>
</form>
<br><br>
<h3>Hasil :</h3><br>
<table border="1">
<tr><td>celcius : <?php echo"$celcius" ?></td><td>reamur : <?php echo"$reamur"
?></td><td>fahrenheit : <?php echo"$fahrenheit" ?></td><td>kelvin : <?php echo"$kelvin"
?></td></tr>
</table>
</body>
</html>