Wednesday, August 17, 2011

In C++, how to develop a program that inputs a four digit number and the output will be the number in reverse?

I got an ignment of C++ asking to develop a program that inputs a four digit number and the output will be in reverse. For example, if you put 4239, the output is 9 - 3 - 2 - 4. In the program, we're allowed to use integer division and modulus operator only.

No comments:

Post a Comment