1.
int n,p=1;
cin >> n;
while(n){
p*=n%10;
n=n/10;
}
cout << p;
2.
int n,s=0;
cin >> n;
while(n){
if(n%10==5)s+=5;
n=n/10;
}
cout << s;
3.
int n,p=1;
cin >> n;
while(n){
if(n%10>4) p*=n%10;
n=n/10;
}
cout << p;
4.
int n,i;
cin >> n;
for(i=2;i<=n;i+=2) cout << i << " ";
Am scris doar corpul functiei principale, te descurci cu restul.