#include <iostream>
using namespace std;
int main()
{
int n, cif, s=0;
cin>>n;
if(n!=0)
do
cif=n%10;
if(cif%2==0)
s+=cif;
n=n/10;
}
while(n!=0);
cout<<s;
return 0;
Am facut si in pseudocod in poza