answersLogoWhite

0

#include
#include
main()
{
int i,j=0,k;
printf("enter u r binary number");
scanf("%d",&i);
while(i>0)
{
k=i/10; // reminder
i=i%10;// for divident
j=j+(k*pow(2,k));conversion function
}
printf("decimal number is :%d",j);
}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Convert binary number 110111 to decimal?

Binary 110111 is equivalent to decimal 55.


Convert 186 decimal numbers to its binary equivalent?

Convert 189 to binary number


How do you convert decimal number 63 to binary?

The binary equivalent of the decimal number 63 is 111111.


How do you write a c program to convert binary to decimal by using while statement?

write a c++ program to convert binary number to decimal number by using while statement


Convert 11101 to decimal?

The decimal equivalent of the binary number 11101 is 29.


Convert the following decimal numbers into their equivalent binary numbers and then convert the resulting binary numbers back into the decimal numbers a. 6401 b. 1010110?

a) 6401 in Binary is 1100100000001b) 1010110 in decimal is 86


Convert 10011001110000000000 into a 6 number decimal?

This Binary Wil Be Equivalent to 629760 in decimal.


What is the answer to Convert the binary number 11000101 to its equivalent decimal number?

11000101 = 197


Convert the decimal numbers 1987 to binary then to octal?

In binary this number is equivalent to 11111000011 while in octal it is 3703


How we can convert decimal number into binary number in foxpro programming?

In FoxPro, you can convert a decimal number to a binary number using the DECIMAL() and STR() functions. First, use DECIMAL() to get the binary representation, then format it as a string using STR(). Here's an example: binaryString = STR(DECIMAL(decimalNumber, 2)). This will give you the binary equivalent of the decimal number.


Write algorithms and draw a corresponding flow chart to convert a decimal number to binary equiavalent?

Write algorithms and draw a corresponding flow chart to convert a decimal number to binary equivalent?


What is the binary equivalent of the decimal number 131?

The binary equivalent of the decimal number 131 is 10000011.