Computer Science, asked by Shaurya9999, 8 months ago

Write an algorithm to input a two digit number. Calculate and print the sum of the digits​
Please Tell Fast

Answers

Answered by mirareeb033
3

Answer:

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