64,631
社区成员
发帖
与我相关
我的任务
分享
int nTmpValue = 0;
int nFinalValue = 0;
printf("请输入需要处理的数据:");
cin >> nTmpValue;
while(nTmpValue%10)
{
nFinalValue += nTmpValue % 10;
nTmpValue = nTmpValue / 10;
}
printf("最终结果:%d",nFinalValue);
// printf("Hello Word ");
system("pause");
return 0;