#ifelifelse_exam.sh实用if/elif/else结构对分数进行排序
#/bin/bash

#提示用户输入分数
echo "Please Input a score [0-100]."
read score

#判断学生分数类别
if [ "$score" -lt 0 -o "$score" -gt 100 ]
then 
        echo "The score is illeagle not in [0-100]"
        exit 1
elif [ "$score" -gt 79 ]
then 
        echo "The grade is a"
elif [ "$score" -gt 69 -a 80 ]
then 
        echo "The grade is B"
else
        echo "The grade is C"
fi