Minggu, Desember 16, 2012

TUGAS 3 WEB PROGRAMING -INPUT NILAI


<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:

Poskan Komentar

Related Posts Plugin for WordPress, Blogger...
Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | JCpenney Printable Coupons