Home C C++ Java Python Perl PHP SQL JavaScript Linux Online Test Forum

Home » C » Solved Programs » Find even digits of any number

C program to find even digits of any number

#include<stdio.h>

int main()
{

int no;

printf("\n Enter any no :");
scanf("%d",&no);

while(no != 0)
{
if( (no%10)%2 ==0)    
printf(" %d ", no%10);
no = no /10;

}
return 0;
}