Important alert: (current site time 7/22/2014 4:24:28 PM EDT) They're finally here! Check out our new 7 Source Code CDs!

# Decimal to Binay Conversion using recursive function

Email
 Submitted on: 9/26/2007 7:41:15 AM By: Sachindra Bharti Level: Advanced User Rating: Unrated Compatibility: Borland C++ Views: 17794

Decimal to Binary conversion

### INCLUDE files:

Can't Copy and Paste this?
 //************************************** //INCLUDE files for :Decimal to Binay Conversion using recursive function //************************************** Mentioned in the program
code:
Can't Copy and Paste this?
 Terms of Agreement:    By using this code, you agree to the following terms...    You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.    You may link to this code from another website, but ONLY if it is not wrapped in a frame.  You will abide by any additional copyright restrictions which the author may have placed in the code or code's description. //************************************** // Name: Decimal to Binay Conversion using recursive function // Description:Decimal to Binary conversion // By: Sachindra Bharti // // Inputs:Any Decimal number // // Returns:Binary Number // // Assumes:Must know decimal and binary numbers // // Side Effects:nil // //This code is copyrighted and has// limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=11714&lngWId=3//for details.//************************************** #include #include //decimal to binary conversion using recursive function void dectobin(long n); void main() { clrscr(); long n; cout<<"\n Enter any decimal number :"; cin>>n; dectobin(n); // calling of function getch(); } //definition of recursive function void dectobin(long n) { int r; if (n<=0) {cout<<"\n Binary Equavalent is :"; return; } r = n % 2; dectobin(n/2); cout< #include //decimal to binary conversion using recursive function void dectobin(long n); void main() { clrscr(); long n; cout<<"\n Enter any decimal number :"; cin>>n; dectobin(n); // calling of function getch(); } //definition of recursive function void dectobin(long n) { int r; if (n<=0) {cout<<"\n Binary Equavalent is :"; return; } r = n % 2; dectobin(n/2); cout<

Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

9/27/2007 3:11:55 AMRodentor Z. Sano

Very Good! :-)
www.sanosolutions.somee.com
(If this comment was disrespectful, please report it.)