Răspuns :
a)
#include <iostream>
using namespace std;
int main()
{
int nr, s=0;
cin>>nr;
while(nr!=0)
{
if(nr%2==0)
s=s+nr%10;
nr=nr/10;
}
cout<<s;
return 0;
}
b)
#include <iostream>
using namespace std;
int main()
{
int nr, p=1;
cin>>nr;
while(nr!=0)
{
if(nr%10%3==0)
p=p*(nr%10);
nr=nr/10;
}
cout<<p;
return 0;
}
c)
#include <iostream>
using namespace std;
int main()
{
int nr, s=0;
cin>>nr;
while(nr!=0)
{
if(nr%10==2||nr%10==3||nr%10==5||nr%10==7)
s=s+nr%10;
nr=nr/10;
}
cout<<s;
return 0;
}