Program:
echo example of nested if-elses
echo Enter either 1 or 2
read i
if [ $i -eq 1 ]
then
echo you would go to heaven!
else
if [ $i -eq 2 ]
then
echo Hell was created with you in mind
else
echo How about mother earth!
fi
fi
Input/OutPut
example of nested if-elses
Enter either 1 or 2
1
you would go to heaven!
No comments:
Post a Comment