Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<<<Converting Decimal to Hexidecmal>>>

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello, I need help making this [simple]C++ program. I have to meet the following requirements:

Input a 2 digit decimal number.
Make sure it is legal (01-99).
Output a 2 digit hexidecmal number equivalent to the decimal number.

thankyou for your time
 
I know very little but just happened to see this topic recently ...

if number <= 99
if number >= 1
cout << hex << number ;
endif
endif

I know the syntax of the if statements is not correct but you can deal with that.

Hope that helps.

[sig]<p>Don<br><a href=mailto:dond@csrinc.com>dond@csrinc.com</a><br><a href= > </a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top