#### Sum of digits of Number

find sum of digits of number using shell

how we will calculate

###### Let’s code

```
#!/bin/bash
read -p "Enter the number: " num
sum=0
while ((num != 0))
do
b=$((num%10))
num=$((num/10))
let sum+=$b
done
echo "Sum of digits are: " $sum
```

That was all about the shell or we can say it