How to reverse a number in C++? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to reverse a number in C++?

1st Oct 2021, 5:41 AM
Ritesh Kumar Gupta
Ritesh Kumar Gupta - avatar
3 Answers
+ 2
Martin Taylor ok, I see. I was wondering that your one doesn't look like C. Here is often asked, how to reverse a string. Therefor, we can use all the nice string functions. But here is ask for how to reverse a number. And that's why I thought it could be a good idea to show how it works if we let the number a number. Only as an other option. So every thing is fine. Btw, we prefer Paderborner or maybe Krombacher here 😉
1st Oct 2021, 5:19 PM
Coding Cat
Coding Cat - avatar
+ 1
Martin Taylor sorry, I thought this question was about C ++ and I just wanted to show that it can be done without string conversion. But if this is about C, and only as a string, then I'd better delete that.
1st Oct 2021, 1:45 PM
Coding Cat
Coding Cat - avatar
0
How to convert
1st Oct 2021, 6:10 AM
Ritesh Kumar Gupta
Ritesh Kumar Gupta - avatar