Bhuvan InfoTech Android App

Download our Android App and browse Technical News, Projects, Computer Tricks more easily with lots of Interesting Features.

Tuesday, June 14, 2016

Convert Decimal Number to Binary Number | C program

#include<stdio.h>
void bn(long);
int main()
{
 long no;
 printf("Type a value : ");
 scanf("%ld",&no);
 bn(no);
 return 0;
}

void bn(long no)
{
 if(no>1)
  bn(no/2);
 printf("%ld",no%2);
}
Bhuvan Arora

No comments:

Amazing Deal !