Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo "----------------------------------------------------------"
- echo "Check Number is the Largest Number, Smallest Number And Same"
- echo "----------------------------------------------------------"
- echo -n "Enter Number A:"
- read a
- echo -n "Enter Number B:"
- read b
- echo -n "Enter Number C:"
- read c
- echo "---------------------------"
- if [ $a -gt $b -a $a -gt $c ]
- then
- echo "Number A is Largest"
- elif [ $b -gt $c -a $b -gt $a ]
- then
- echo "Number B is Larget"
- elif [ $c -gt $b -a $c -gt $a ]
- then
- echo "Number C is Largest"
- elif [ $a -eq $b -o $a -eq $c -o $b -eq $c ]
- then
- if [ $a -eq $b -a $a -eq $c -a $b -eq $c ]
- then
- echo "---------------------------"
- echo "All Value is Same"
- echo "---------------------------"
- else
- echo "---------------------------"
- echo "Entered Two Value is Same"
- echo "---------------------------"
- fi
- fi
- echo "---------------------------"
- if [ $a -lt $b -a $a -lt $c ]
- then
- echo "Number A is Smallest"
- elif [ $b -lt $c -a $b -lt $a ]
- then
- echo "Number B is Smallest"
- elif [ $c -lt $b -a $c -lt $a ]
- then
- echo "Number C is Smallest"
- elif [ $a -eq $b -o $a -eq $c -o $b -eq $c ]
- then
- if [ $a -eq $b -a $a -eq $c -a $b -eq $c ]
- then
- echo "---------------------------"
- echo "All Value is Same"
- echo "---------------------------"
- else
- echo "---------------------------"
- echo "Entered Two Value is Same"
- echo "---------------------------"
- fi
- fi
- echo "---------------------------"
Add Comment
Please, Sign In to add comment