echo "Enter marks(out of 30) of "
read -p "Subject 1: " s1read -p "Subject 2: " s2read -p "Subject 3: " s3sum=`expr $s1 + $s2 + $s3`echo "Sum of marks of 3 subjects is : "$sumper=`expr $sum \* 10 / 9`echo "Percentage: "$perif [ $per -ge 60 ]thenecho "you got Distinction"elif [ $per -ge 50 ]thenecho "you got First class"elif [ $per -ge 40 ]thenecho "You got second class"elseecho "sorry you failed! better luck next time"fi
0 Comments