This code is using for converting Decimal number to Binary number.
Sample Input : 15
Output : 1111
Code is :
#include<stdio.h>
int main()
{
int Num1,b;
printf("\n\tEnter Number to find binary : ");
scanf("%d",&Num1);
printf("\n\tBinary is : ");
while(Num1!=0)
{
b=Num1%2;
printf(" %d",b);
Num1=Num1/2;
}
}