$num=$_POST["num"];
switch($num){
case $num>=90 && $num<=100:
echo "你的成绩为优秀";
break;
case $num>=80 && $num<90:
echo "你的成绩为良好";
break;
case $num>=60 && $num<80:
echo "你的成绩为中等";
break;
case $num>=0 && $num<60:
echo "你的成绩为及格";
break;
case $num>=0 && $num<60:
echo "你的成绩为不及格";
break;
case $num>100 || $num<0:
echo "成绩出错";
break;
}
?>
来源地址:https://blog.csdn.net/weixin_44014812/article/details/128348634