#include<stdio.h>
#include<conio.h>
int main()
{
int n, nsave, rem, d, j = 1, decimal = 0;
printf(“Enter the number in binary”);
scanf_s(“%d”, &n);
nsave = n;
while (n>0)
{
rem = n%10;
d = rem*j;
decimal= decimal+d;
j = j * 2;
n =n/ 10;
}
printf(“Binary number = %d, Decimal number = %d\n”, nsave, decimal);
return 0;
}
Hiya very nice web site!! Guy .. Excellent .. Amazing .. I’ll bookmark your blog and take the feeds additionally…I am glad to seek out so many helpful info here within the publish, we’d like work out more techniques on this regard, thank you for sharing. . . . . .