File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Purpose: Validate and report Student subject marks
3
+ # Version:1.0
4
+ # Created Date: Wed May 16 19:00:52 IST 2018
5
+ # Modified Date:
6
+ # Author: Ankam Ravi Kumar
7
+ # START #
8
+ echo -e " Please Enter Maths Marks: \c"
9
+ read -r m
10
+ echo -e " Please Enter Physics Marks: \c"
11
+ read -r p
12
+ echo -e " Please Enter Chemistry Marks: \c"
13
+ read -r c
14
+
15
+ if [ $m -ge 35 -a $p -ge 35 -a $c -ge 35 ]; then
16
+ total=` expr $m + $p + $c `
17
+ avg=` expr $total / 3`
18
+ echo " Total Marks = $total "
19
+ echo " Average Marks = $avg "
20
+ if [ $avg -ge 75 ]; then
21
+ echo " Congrats you got Distinction"
22
+ elif [ $avg -ge 60 -a $avg -lt 75 ]; then
23
+ echo " Congrats you got First Class"
24
+ elif [ $avg -ge 50 -a $avg -lt 60 ]; then
25
+ echo " You got second class"
26
+ elif [ $avg -ge 35 -a $avg -lt 50 ]; then
27
+ echo " You Got Third Class"
28
+ fi
29
+ else
30
+ echo " Sorry You Failed"
31
+ fi
32
+
33
+ # END #
You can’t perform that action at this time.
0 commit comments