โ Back to Loops
Question 340
Reverse a Number
Reverse a Number
Read a positive integer from input, then use a loop to reverse its digits and print the result. For example,123becomes321. For input123the output is: 321
Expected Output:
321
Topics:
Loops
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.