วันอังคารที่ 19 พฤศจิกายน พ.ศ. 2556

PHP

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
$score=100;
if($score < 51){
echo 'grade 0';
}else if($score < 56){
echo 'grade 1';
}else if($score < 61){
echo 'grade 1.5';
}else if($score < 66){
echo 'grade 2';
}else if($score > 71){
echo 'grade 2.5';
}else if($score > 76){
echo 'grade 3';
}else if($score > 81){
echo 'grade 3.5';
}else {echo 'grade4';}
?>
</body>
</html>

ไม่มีความคิดเห็น:

แสดงความคิดเห็น