answersLogoWhite

0


Best Answer

Its is inputted by the user...!!!

anyways the program to convert the binary equivalent of a decimal number is as follows:

#include

#include

void main()

{ int i,n,j,b[100];
clrscr();
printf("Enter a Number:");
scanf("%d",&n);
i=0;
while(n>0)
{
b[i]=n%2;
n=n/2;
i++;
}
printf("\n\nBinary Equivalent:");
j=i-1;
for(i=j;j>=0;j--)
printf("%d",b[j]);
getch();
}

using this algorithms... the binary equivalent of any number is taken out...!!! enjoy... have any query... email at :- "devilllcreature@Yahoo.com" thank you....!!!

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the decimal conversion of the binary number base 2?
Write your answer...
Submit
Still have questions?
magnify glass
imp