Program:
echo "Example of the Nested If"
echo "Enter the Value of a"
read a
echo "Enter the value of b"
read b
if test $a -eq $b
then
echo a and b are equal
elif test $a -lt $b
then
echo a is lessthan b
else
echo a is greaterthan b
fi
Input/OutPut
Example of the Nested If
Enter the Value of a
7
Enter the value of b
9
a is lessthan b
No comments:
Post a Comment