题目连接:http://acm.pku.edu.cn/JudgeOnline/problem?id=3673
实际要求将两个数的各位数字的和做乘积运算然后输出结果!
#include <iostream>
using namespace std;
int main()
{
int a,b,res;
while(cin >> a >> b)
{
res = 0;
while(a != 0)
{
res += a % 10;
a /= 10;
}
a = 0;
while(b != 0)
{
a += b % 10;
b /= 10;
}
res *= a;
cout << res << endl;
}
return 0;
}