elif.ksh
#!/bin/ksh
# elif.ksh
# This program demontrates the use
# of elif, the ability to make a
# 2nd test if the 1st test is false.
# - Jim
# Assign a default grade.
Grade="F"
# Clear the screen.
clear #This is a unix command.
print -n "Enter number grade: "
read NumberGrade
if (( NumberGrade > 89 ));then
# Person gets an "A".
Grade="A"
elif (( NumberGrade > 79 ));then
# Person gets an "B".
Grade="B"
elif (( NumberGrade > 69 ));then
# Person gets an "C".
Grade="C"
elif (( NumberGrade > 59 ));then
# Person gets an "D".
Grade="D"
fi
print
print "Letter grade is: $Grade"