Convert decimal numerals to hexadecimal:char c(int k) ?
-
this is how far i got i seriously need help char c(int k) { assert (k >= 0 && k <= 15); if (k < 10) return char(k + '0'); return char(k - 10 + 'a'); } string s(int n) { if (n == 0) return string(1,'0'); string s; while (n > 0) { s = string(1,c(n% 16)) + s; n /= 16; } return s; } donno wat's next ?? doesnt compile and need a project methdology
-
Answer:
You're completely wrong, your code makes no sense. Read the textbook.
hoda a at Yahoo! Answers Visit the source
Related Q & A:
- How to Convert a C++ Structure into C# Structure?Best solution by Stack Overflow
- How to convert a char array into an int in C++?Best solution by Stack Overflow
- How to convert from string to char in C++?Best solution by Stack Overflow
- Converting char array to double in C?Best solution by stackoverflow.com
- How do you convert an IP address to hexadecimal?Best solution by ncalculators.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.