Hello everyone,
I'm trying to figure out how i'm suppose to ouput a number reversed, such as, 123 output it as 321.
I'm not allowed to use arrays so i'm thinking there has to be a mathamatical way of doing this. There is no fixed amount of numbers, it can be 2 to whatever the user wants to enter, any idea's? Like this almost worked....
input: 155
155%10 = 5;
15%10 = 5;
10%10 = 0;
almost got 551![]()
% is mod in C++ but u all probably knew that just making sure!
Thanks for listening![]()




Reply With Quote