Salut. Uite aici o metoda. Succes in continuare!
#include <iostream>
using namespace std;
int main()
{
int a,b,s=0;
cin>>a>>b;
cout<<"Cifre: ";
while(a && b)
{
s=s+a%10+b%10;
cout<<a%10<<" ";
cout<<b%10<<" ";
a=a/10;
b=b/10;
}
cout<<"Suma: "<<s<<endl;
return 0;
}