Question: #!/bin/bash if [ $val1 -gt 100 ] then echo A elif [ $val1 -lt 10 ] then echo B elif [ $val1 -ge 75 ]

#!/bin/bash

if [ $val1 -gt 100 ]

then

echo "A"

elif [ $val1 -lt 10 ]

then

echo "B"

elif [ $val1 -ge 75 ]

then

echo "C"

elif [ $val1 -le 25 ]

then

echo "D"

elif [ $val1 -eq 50 ]

then

echo "E"

elif [ $val1 -ne 40 ]

then

echo "F"

else

echo "G"

fi

For each value of val1 below, what does the script output?

a. -5

b. 50

c. 20

d. 74

e. 25

f. 108

g. 87

h. 40

i. 6

j. 40

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!