Write a shell script to reverse the entered number.(e.g. if user enters the number 123 then the output will be 321)
echo -n "Enter number :"
read n
sum=0
while [ $n -ne 0 ]
do
rem=`expr $n % 10`
n=`expr $n / 10`
sum=`expr $sum \* 10 + $rem`
done
echo "Reverse number is $sum"
Shopping In MUMBAI
Are you searching for Discounts, offers, sale in Mumbai ? You are in the right place. MUMBAI, a shopping haven, has no dearth of great discounts and sales. This blog features the best MUMBAI shopping offers, sale, discounts and deals and bargains CURRENTLY GOING on in Mumbai plus a few free things thrown in on top.
Don't wait for it because once they are gone, they are gone. Hurry!..By clicking the "Like" button you will receive a daily update of discounts, sale, offers going on in Mumbai. LIKE IT.... SHARE IT...njoY.
Tuesday, January 27, 2009
Program in UNIX to reverse the entered number.
Posted by ars at 6:04 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment