CJCoding With Joseph

Reverse a Number

Read a positive integer from input, then use a loop to reverse its digits and print the result. For example, 123 becomes 321.

For input 123 the output is:

321

Expected Output:

321
Topics:
Loops
๐Ÿ“ฅ Auto-Input:
123\n
This input is automatically fed to your program's stdin
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.