c++ program for the conversion of decimal numbers to hexadecimal numbers

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2008
Posts: 1
Reputation: sumitk538 is an unknown quantity at this point 
Solved Threads: 0
sumitk538 sumitk538 is offline Offline
Newbie Poster

c++ program for the conversion of decimal numbers to hexadecimal numbers

 
0
  #1
Dec 7th, 2008
can anyone give me the program in turbo C++ for the conversion of decimal numbers to hexadecimal numbers, octal numbers to decimal numbers. it will be so kind of you.
thanx.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,917
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 274
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: c++ program for the conversion of decimal numbers to hexadecimal numbers

 
0
  #2
Dec 7th, 2008
Use integer division and remainder operations with 16 or 10 or 8.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 3
Reputation: OM PARWANI is an unknown quantity at this point 
Solved Threads: 0
OM PARWANI OM PARWANI is offline Offline
Newbie Poster

Re: c++ program for the conversion of decimal numbers to hexadecimal numbers

 
0
  #3
Dec 7th, 2008
As i think about this thread we should divide by 16 the no. in decimal to convert in hexadecimal untill we get remainder 0 then remainder left should be return in reverse order
ex-
22 in decimal
/16 1 quotient 6 is remainder
again 1/16 1
answer is 16
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 670
Reputation: Freaky_Chris is a jewel in the rough Freaky_Chris is a jewel in the rough Freaky_Chris is a jewel in the rough 
Solved Threads: 113
Freaky_Chris's Avatar
Freaky_Chris Freaky_Chris is offline Offline
Practically a Master Poster

Re: c++ program for the conversion of decimal numbers to hexadecimal numbers

 
0
  #4
Dec 7th, 2008
The two previous posters are correct, just a note although the logic behind it is not too hard, i would suggested you go over the manual method on paper so you know for sure what you are doing before you start writting some code. Otherwise you may get even more confused.

Chris
Knowledge is power -- But experience is everything
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC