//A PROGRAM TO CONVERT DECIMAL NO. INTO BINARY NO.//
//THIS IS LIKE I M TAKING LCM OF NUMBER TO REPRESENTATION INTO BINARY ...THAT IS A STANDARD TECHNIQUE THAT WE ALWAYS USE...//SO PRESERVE THAT REMAINDER.....REPRESENT THAT NUMBER INTO REVERSE ORDER..//
#include<stdio.h>
int main()
{
int i=0,j,rem[50],n;
printf("ENTER THE NO. WHICH IS TO BE CONVERTED INTO BINARY:\n");
scanf("%d",&n);//35 ....
while(n!=0)
{
rem[i]=n%2;//i is INCREMENTING EVERYTIIME ....SO BY DIVIDING 2 EVERYTIME ...//REMAINDER WILL BE EITHER 0 OR 1 ...SO BINARY REPRESENTATION COULD BE DONE
//n%2=remainder is preserved everytime ...in rem[i]...untill number become 0 itself
n=n/2;//number is also divided by 2...after taking remainder of number...
i++;
}
printf("binary no=");
for(j=(i-1);j>=0;j--)//REPRESENT THE REMAINDER IN REVERSE ORDER..//