#include<stdio.h>
long fun(long x)
{
int n=10,m=0;
while (x)
{
int t=x%10;
if(t%2==0)
{
m+=t*n/10;
n*=10;
}
x/=10;
}
return m;
}
void main()
{ long a,b;
printf("Enter a number:");
scanf("%ld",&a);
b=fun(a);
printf("b=%ld\n",b);
}
#include<stdio.h>
long fun(long x)
{
int n=10,m=0;
while (x)
{
int t=x%10;
if(t%2==0)
{
m+=t*n/10;
n*=10;
}
x/=10;
}
return m;
}
void main()
{ long a,b;
printf("Enter a number:");
scanf("%ld",&a);
b=fun(a);
printf("b=%ld\n",b);
}