Stuck on a challange to have user input a value and determie if it is a palindrom; I tried reversing the checks and still the same and the cout's for each line in the for loop was just to verify the comparrison was correct
here is what i have
#include <iostream>
#include <string>
usingnamespace std;
int main(){
string input;
string output;
cout << "Hello, please enter a string, I'm going to do fun things with it!";
cout << "\n\n"; //newline is backslash n for the uninitiated
getline(cin,input); //read a whole line from the user (can use spaces)
int counter = 0;
int maxCounter = input.size();
while(counter < maxCounter){
if (counter % 2 == 0){
output += input[input.size()-counter-1];
}
else{
output += "-";
}
counter = counter + 1;
}
std::cout << std::endl; //using namespace std is splendid isn't it?
cout << "\n" << "\n" << "****\n\n"; //oh output stream operator how I love thee
cout << output;
cout << "\n\n\n\t\t()()\n\n\t\t(o.o)\n\n\t\t(\")(\")\n\n";
}