Custom Search

Friday, 20 April 2012

Write a Linux shell script that reverses the number, Unix program to reverse the number


Write a Linux shell script that reverses the number, Unix program to reverse the number




Program
clear
echo "Enter any number:"
read n
sum=0
while [ $n-gt 0]
do
   a='expr $n%10'
done
echo "Reverse no:" $Sum


Output
Enter any number 
435
Reverse no: 534
<<< Previous  ||  Current  ||  Next >>>  

1 comment:

  1. yes,sir very simple code and easily understand
    thankyou sir............

    ReplyDelete

Laptops