Program to convert a binary number to a decimal number in C.
include<stdio.h>
int main( )
{ int n,nsave,rem,d,j=l,dec=O;
printf("Enter the number in binary :");
scanf ("%d", &n) ;
nsave=n;
while (n>O)
{
rem=n%lO; /*Itaking last digit1 */
d=rem*j;
dec+=d;
j*=2;
n/=lO; /*skippin...
himanshu-holmes.hashnode.dev1 min read