Answers for "sum the digits in c#"

C#
0

sum the digits in c#

sum = 0;
while (n != 0) {
    sum += n % 10;
    n /= 10;
}
Posted by: Guest on April-25-2020

C# Answers by Framework

Browse Popular Code Answers by Language