answersLogoWhite

0


Best Answer

# include <stdio.h> void Rec_Dec_To_Bin (int num); void main () { int num; int base; printf ("Enter the decimal number to convert it binary.\n"); scanf ("%d", &num); printf ("The number in decimal is : %d\n", num); printf ("\n"); printf ("The %d in binary is : ", num); Rec_Dec_To_Bin (num); printf ("\n\n"); } void Rec_Dec_To_Bin (int num) { if (((num / 2) != 0) && (num > 1)) { Rec_Dec_To_Bin ((num / 2)); } printf ("%d", (num % 2)); }

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program for converting decimal into binary using recursion?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the decimal of 10000000000?

Assuming you're converting from binary - that would be in 1024 decimal format.


Convert 11011001 to decimal?

The answer depends on what you are converting from: binary, ternary, octal, hexadecimal ...


Explain the process of converting binary numbers to decimal and decimal numbers to binary?

ask mrs lane room 503 at cbhs periods 6-7


How many megabytes are in 100 megabytes?

100, 104.858, or 95.367, depending on if you mean decimal to decimal, binary to binary, decimal to binary, or binary to decimal. Simply, decimal megabytes, used by the storage industry, is 1,000KB, where each KB is 1,000 bytes. Binary megabytes, used by programmers (such as Microsoft, Linux, etc) are 1,024 KB, where each KB is 1,024 bytes (2^10, or 0x0200). Converting from decimal to binary will yield a smaller number of megabytes, while converting from binary to decimal will result in more megabytes.


What is the answer to converting 125 binary back to a decimal?

That question is defective, and it has no answer.' 125 ' is not a binary number.A binary number never has a digit bigger than ' 1 ' in it.


Convert 110001100 into its decimal numbers?

The answer depends on what you are converting from: binary, ternary, octal, hexadecimal ...


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


What are the rules in converting binary numbers to decimal numbers?

25 and nothing that had a decimal point well the number 369.3125 decimal. to convert to binary it worked fine the whole number 369 by justnumber by just dividing the desired base so since i wanted binary


Why is it more difficult to convert decimal to hexadecimal?

As compared to converting decimal into what other base! It is no more difficult to convert decimal into base 8 than decimal into binary or Hex.


What is the process of converting a program to machine language called?

Binary, executable or object code


What is the octal equivalent of decimal number 16?

The octal equivalent of decimal number 16 is 20. In octal, each digit represents three binary digits, so converting decimal 16 (which is 10000 in binary) into octal gives 20.


What is binary decimal conversion?

It is a procedure for converting numerical data stored in information technology (electronic or optical) media to the decimal form that people are accustomed to using.