Computer Science, asked by lakhveerkaurkaur65, 10 months ago

write an algorithm to find sum of phone number​

Answers

Answered by devanshdixit456
0

Explanation:

General Algorithm for sum of digits in a given number:

Get the number.

Declare a variable to store the sum and set it to 0.

Repeat the next two steps till the number is not 0.

Get the rightmost digit of the number with help of remainder '%' operator by dividing it with 10 and add it to sum.

Similar questions