Problem

Reverse the digits of non-negative n using a while loop.

Examples

  • reverseNumWhile(123) -> 321
  • reverseNumWhile(5) -> 5
Compile and test (Ctrl+Enter)