I am honestly completely lost and could use any help i can get.
Code:#include <iostream> #include <stdlib.h> #include <string.h> #include <math.h> using namespace std; int string; int create; int check; char n; bool done; bool reverse; int main() { int choice; int myString; { cout << "***Welcome To The PALINDROME GAME!***";"\n"; cout << "Choose which function you would like to run.";"\n\n"; cout << "1)Check to see if a word is a palindrome.";"\n"; cout << "2)Make a palindrome.";"\n"; cin << choice; { if choice==1 (cout << check); else (cout << create); char myString[10]; cin >> myString; int n[10] = {0,1,2,3,4,5,6,7,8,9}; n[0] = 1; n[1] = 2; n[2] = 3; n[3] = 4; n[4] = 5; n[5] = 6; n[6] = 7; n[7] = 8; n[8] = 9; n[9] = 10; } } } int create() { cout << "Please enter a string to be checked for palindromeness"; cin >> string; cout << reverse; if string==reverse cout << "HOORAY! IT IS A PALINDROME!"; else cout << "BOOOOO! IT IS NOT A PALINDROME!"; } /* int check() { } */ bool reverse() { cout << myString[9] << myString[8] << myString[7]; cout << myString[6] << myString[5] << myString[4]; cout << myString[3] << myString[2] << myString[1] << myString[0]; }
i will probably have to end up redoing the whole code, i am seriously completely lost
any help or suggestions greatly appreciated!
(here are the requirements of the assignment:
Palindrome
Has both a “check” and “create” palindrome function
Uses arrays of characters
Does not contain extraneous library headers
Formatted and commented correctly
Extra Credit
Can remove characters from a string that is not a palindrome (from “check” function)