Write a shell script to check Armstrong number?
Answers
Answered by
1
Answer:
Write a shell script to find a number is Armstrong or not
Explanation:
Steps
Start
read number
set sum=0 and temp=number
reminder=number%10
sum=sum+(reminder*reminder*reminder)
number=number/10
repeat steps 4 to 6 until number > 0
if sum = temp
display number is armstrong
else
display number is not armstrong
stop
Attachments:
Similar questions