postheadericon Write a shell script to Accept number and check the number is even or odd, finds the length of the number, sum of the digits in the number.


clear
echo "Enter Number : "
read no

count=0
total=0


if [ `expr $no % 2` -eq 0 ]
then
echo "NUMBER IS EVEN"
else
echo "NUMBER IS ODD"
fi

while [ $no -ne 0 ]
do
a=`expr $no % 10`
no=`expr $no / 10`
total=`expr $total + $a`
count=`expr $count + 1`
done


echo "Sum of All Digit : $total"
echo "Total No. of Digit : $count"

postheadericon Write a shell script to accept the string and checks whether the string is palindrome or not.


clear
echo "Enter String : \c"
read str

len=`echo $str|wc -c`
len=`expr $len - 1`

echo "length of String : "$len

i=1
while [ $i -le $len ]
do
revstr=`echo $str|cut -c$i`$revstr
i=`expr $i + 1`
done

if [ "$revstr" = "$str" ]
then
echo "Your string is palindrome"
else
echo "Your string is not palindrome"
fi

postheadericon Write a shell script to accept numbers and perform addition, subtraction, division and multiplication.


echo "Enter Number 1 : "
read a
echo "Enter Number 2 : "
read b

ans=`expr $a + $b`
echo "Addition : " $ans

ans=`expr $a - $b`
echo "Subtraction : " $ans

ans=`expr $a / $b`
echo "Division : " $ans

ans=`expr $a \* $b`
echo "Multiplication : " $ans

postheadericon Be a freelancers and become your own Boss

Are you looking for good Job?
Do you interested to earn dollars?
Are you satisfied with your daily hectic schedule of Job?
Are you interested to work form your home or what ever the place you like?


What your answer is yes !!!

here is the solution

Be a Freelancer and become your own boss




Just read article of The Economic Times
 


postheadericon Vacancy for IT Peoples in Indian Navy


Join Indian Navy

our Indian Navy invites unmarried Male to join Navy a (SSC) Officers in Executive Branch (Information Technology)  for December-2012 Course

Total Pageviews

© BipinRupadiya.com. Powered by Blogger.