<html>
<head>
</head>
<body>
<div id="form">
<?
$nim=$_REQUEST["nim"];
$nama =$_REQUEST["nama"];
$makul =$_REQUEST["makul"];
$jml_hadir =$_REQUEST["jml_hadir"];
$nilai_tugas =$_REQUEST["nilai_tugas"];
$nilai_uts =$_REQUEST["nilai_uts"];
$nilai_uas =$_REQUEST["nilai_uas"];
$nilai_akhir = (0.1*($jml_hadir/0.1))+(0.2*$nilai_tugas)+(0.35*$nilai_uts)+(0.35*$nilai_uas);
if ($nilai_akhir>=90)
{
$nilai="A";
}
else if ($nilai_akhir>=70)
{
$nilai="B";
}
else if ($nilai_akhir>=50)
{
$nilai="C";
}
else if ($nilai_akhir>=30)
{
$nilai="<font color=red>D</font>";
}
else
{
$nilai="<font color=red>E</red>";
}
echo "<table><tr><td>NIM</td><td>:</td><td>$nim</td></tr>
<tr><td>Nama Lengkap</td><td>:</td><td>$nama</td></tr>
<tr><td>Mata Kuliah</td><td>:</td><td>$makul</td></tr>
<tr><td>Nilai Akhir</td><td>:</td><td>".ceil($nilai_akhir)."</td></tr>
<tr><td>Nilai</td><td>:</td><td>$nilai</td></tr></table>";
?>
</div>
</body>
</html>
0 comments:
Posting Komentar