CJCoding With Joseph

Palindrome Number Check

Write a function bool isPalindrome(int n) that returns true if the digits of n read the same forwards and backwards. Read one non-negative integer from standard input and print true or false using boolalpha.

For input 121 the output is:

true

Expected Output:

true
Topics:
Functions
๐Ÿ“ฅ Auto-Input:
121\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 (cout, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.