Array size (positive integer value) Array elements (positive integer values) Write a program that prints whether the array is a palindrome number. A palindrome number is a number that reads the same backwards and forwards. You must implement your solution following the requirements below: a) Do not use cout to print a message before reading the input from STDIN. b) Read the input in the main function. c) Implement a function to print whether all the elements of the array form a palindrome number. You must use a pointer to an integer variable to implement your function. You cannot use square brackets (array notation) inside the function.
can someone help me with this in C++
Given the following input:
Array size (positive integer value) Array elements (positive integer values) Write a program that prints whether the array is a palindrome number. A palindrome number is a number that reads the same backwards and forwards. You must implement your solution following the requirements below:
a) Do not use cout to print a message before reading the input from STDIN.
b) Read the input in the main function.
c) Implement a function to print whether all the elements of the array form a palindrome number. You must use a pointer to an integer variable to implement your function. You cannot use square brackets (array notation) inside the function.
You can assume that the input will always be valid.
Input | Output |
---|---|
5 1 2 3 2 1 | Palindrome number |
5 1 2 1 4 1 | Not a palindrome number |
Step by step
Solved in 3 steps with 3 images