Palindrome Numbers - Check if number is Palindrome
Sun Feb 06 2022 02:42:58 GMT+0000 (Coordinated Universal Time)
Saved by @Uttam #java #mathematics #lecture #gfg #geeksforgeeks #checkpalindrome
Let the given number be num. A simple method for this problem is to first reverse digits of num, then compare the reverse of num with num. If both are same, then return true, else false. Palindrome number algorithm - Get the number to check for palindrome - Hold the number in temporary variable - Reverse the number - Compare the temporary number with reversed number - If both numbers are same, print "palindrome number" - Else print "not palindrome number"
Comments