#6610. 数位之和Sumofdigits

数位之和Sumofdigits

数位之和

版权信息: 作者:Salvador Roura 翻译者:Carlos Molina 生成时间:2026-01-25T10:19:14.158Z 版权:,2006–2026


题目描述

编写一个程序,读取若干个整数,并输出每个整数各位数字之和。


输入格式

输入由若干个自然数组成。


输出格式

对于每个输入的数字,按照示例格式输出其各位数字之和。


输入样例

29
7
0
1020

输出样例

The sum of the digits of 29 is 11.
The sum of the digits of 7 is 7.
The sum of the digits of 0 is 0.
The sum of the digits of 1020 is 3.