Initialize sum = 0 · Extract the last digit of the number and add it to the sum (sum += num % 10) · Reduce the number (num = num / 10 · Keep doing ...
確定! 回上一頁