Răspuns :
#include <iostream>
using namespace std;
int n, cif, s, p = 1;
int main()
{
cin >> n;
while(n != 0)
{
cif = n % 10;
if(cif % 2 == 0) s = s + cif;
else p = p * cif;
n = n / 10;
}
cout << s << " " << p;
return 0;
}
using namespace std;
int n, cif, s, p = 1;
int main()
{
cin >> n;
while(n != 0)
{
cif = n % 10;
if(cif % 2 == 0) s = s + cif;
else p = p * cif;
n = n / 10;
}
cout << s << " " << p;
return 0;
}
#include
using namespace std;
int n, cif, s, p = 1;
int main()
{
cin >> n;
while(n != 0)
{
cif = n % 10;
if(cif % 2 == 0) s = s + cif;
else p = p * cif;
n = n / 10;
}
cout << s << " " << p;
return 0;
} cout<<"Suma cifrelor "<