0

How to reverse the integer when we are getting an input in c++?eg:123 is input, we need to change it as.... 321.

I'm not clear with that portion.

9th Dec 2020, 5:16 PM
RAVIKIRAN.D
RAVIKIRAN.D - avatar
3 odpowiedzi
9th Dec 2020, 5:22 PM
The future is now thanks to science
The future is now thanks to science - avatar
+ 2
try this: int x=0; while(a) { x=x*10+a%10; a/=10; }
9th Dec 2020, 5:24 PM
Amine Laaboudi
Amine Laaboudi - avatar