Program:
echo example of strong number
echo enter the value of n
read n
sum=0
k=$n
while [ $n -gt 0 ]
do
d=`echo $n%10|bc`
fact=1
i=1
while [ $i -le $d ]
do
fact=`echo $fact*$i|bc`
i=`echo $i+1|bc`
done
sum=`echo $sum+$fact|bc`
n=`echo $n/10|bc`
done
if [ $sum -eq $k ]
then
echo it is strong number
else
echo it is not strong number
fi
Input/OutPut
example of strong number
enter the value of n
9
it is not strong number
You did an impressive job by posting this. Explained Thoroughly and perfectly.
ReplyDeleteBest Unix Training in Chennai | Unix shell scripting Training in Chennai
count strong number given range
ReplyDeletemmorpg
ReplyDeleteinstagram takipçi satın al
TİKTOK JETON HİLESİ
tiktok jeton hilesi
Sac Ekim Antalya
referans kimliği nedir
instagram takipçi satın al
metin2 pvp serverlar
İnstagram takipçi