Desimal to banary number
#include<stdio.h>
#include<conio.h>
int main(){
long int num,r,p=10;
clrscr();
printf("Enter any number: ");
scanf("%ld",num);
printf("The binary equivalent is\n: ");
While(num !=0)
{
r=num%2;
gotoxy(p,4) ;
printf("%d",r);
num/=2;
p=p-1;
}


Join the conversation! Your thoughts help the community grow.