Your Only Destination To Empower Your Computer Programing Knowledge. Sky is not so high, You can Touch it if You Try

Script to show use of if-else control structure

echo enter two numbers:-
read a
read b
echo
if [ $a -gt $b ]
then
echo a is greater
else
echo b is greater
fi
~
~
~
~
~
~
~
~
~
~
~
~
"if" 11L, 160C



Output:-


enter two numbers:-
12
11

a is greater

No comments:

Post a Comment