- 4
Write a function that returns true if a given number is a palindrome, and false, if it is not. Complete the given function, so
#include <iostream> using namespace std; bool isPalindrome(int x) { //complete the function } int main() { int n; cin >>n; if(isPalindrome(n)) { cout <<n<<" is a palindrome"; } else { cout << n<<" is NOT a palindrome"; } return 0; }
2 odpowiedzi
+ 4
Please use the forum's search facility to find similar discussions. Many had attempted it and asked questions around it so your chances for getting clues (even a solution) is high.
You can also try searching the Code Playground for examples and/or inspirations around this topic.
+ 3
If you need help with your own code, then please show what you have tried – you just copied the given code, where is your own code?