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"

7 comments:

Unknown said...

There are lots of information about latest technology and how to get trained in them, like UNIX Training in Chennai have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get trained in future technologies(UNIX Training Centers in Chennai). By the way you are running a great blog. Thanks for sharing this.

UNIX Training Centers in Chennai | UNIX Course Chennai

Unknown said...

Thanks for sharing this valuable post.
Regards,
Unix Training in Chennai | Unix course in Chennai | Unix Training institutes in Chennai

priya said...

php online training in chennai
php programming center in chennai
php class in chennnai
php certification course
php developer training institution chennai
php training in chennnai
php mysql course in chennai
php institute in chennnai
php course in chennnai
php training with placement in chennnai
php developer course

priya said...

appium online training
appium training centres in chennai
best appium training institute in chennnai
apppium course
mobile appium in chennnai
mobile training in chennnai
appium training institute in chennnai

priya said...

php online training in chennai
php programming center in chennai
php class in chennnai
php certification course
php developer training institution chennai
php training in chennnai
php mysql course in chennai
php institute in chennnai
php course in chennnai
php training with placement in chennnai
php developer course

priya said...

appium online training
appium training centres in chennai
best appium training institute in chennnai
apppium course
mobile appium in chennnai
mobile training in chennnai
appium training institute in chennnai

w3webschool said...

Really Very Useful Blog Thanks.
Digital Marketing Course in Kolkata

Follow by Email

Total Pageviews

© BipinRupadiya.com. Powered by Blogger.