Question: Numeric Palindrome Write a boolean function that takes an integer parameter and returns true if the base 10 number is a numeric palindrome. Note, you
Numeric Palindrome
Write a boolean function that takes an integer parameter and returns true if the base 10 number is a numeric palindrome. Note, you cannot use any type of string to solve this problem.
bool isNumericPalindrome(int n)
For example
-
isNumericPalindrome(121) true
-
isNumericPalindrome(-121) true
-
isNumericPalindrome(220) false
-
isNumericPalindrome(-220) false
-
isNumericPalindrome(18344381) true
-
isNumericPalindrome(12345) false
-
isNumericPalindrome(1) true
-
isNumericPalindrome(0) true
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
