โ Back to User Input
Question 322
Reverse a Number
Reverse a Number
Read a positive integernfrom standard input and print its digits reversed. For example, if the input is123, print: Reversed: 321 Build the result with the% 10and/ 10operators inside a loop. Leading zeros disappear (so5040becomes405).
Expected Output:
Reversed: 321
Topics:
User Input
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (sysout, psvm, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.