CppBuzz.com
  
Home C C++ Java Python Perl PHP Spring SQL Javascript Linux Forum

C program to find even digits of any number

You are here : Home » Solved Programs in C » 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;
}