วันจันทร์ที่ 25 พฤศจิกายน พ.ศ. 2556

รายงานผลการเรียน


<!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 echo "รายงานผลการเรียน php";
$str="คะแนนที่ได้";
echo $str; 
$score=100;

if($score<50){
echo 'grade 0';

}else if ($score<56){
echo 'grade 1';

}else if ($score<60){
echo 'grade 1.5';

}else if ($score<66){
echo 'grade 2';

}else if ($score<70){
echo 'grade 2.5';

}else if ($score<76){
echo 'grade 3';

}else if ($score<80){
echo 'grade 3.5';

}else if ($score>80){
echo 'grade 4';

?>

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

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