\n"; std::cin >> str;// Create a PString object that will check stringsPString s(str);// Check string and print outputif(s.isPalindrome()) { std::cout << s <<" is a palindrome"; }else{ std::cout << s <<" is not a palindrome"; } std::cout << std::endl;return0; ...
Yes but I want help with that problem not people telling me that im not paying attention in class or not reading. Then make your posts intelligent enough that you don't give that impression. So far all you've done is say "This is my assignment. It has some pretty clear instructions, ...
addition to a period. You will not need to handle empty strings or strings with only a period. Your program should be able to handle multiple strings sent one after another or concatenated together. For example, the string: “abba. data.” should print “Yes” followed by “No” on the ...
2) The final rhyming couplet, which in a sonnet should be a self-contained summing up or surprise, was no longer independent, but extended back into line 12 – not a great crime in the scheme of things, but for a perfectionist this was unsatisfactory. Actually the original ‘bone[pale]-...
Therefore we will do a check ch %2 == 1 then it will be a palindrome or else not. Solution1: Java(using HashSet) //Check if a given string is a rotation of a palindrome public class test7 { public static void main(String[] args) { String s = "Protijayi"...
I think you'll find it much easier to create a function that will take the input string, strip out the non-letters and convert it to upper (or lower) case. Then check this scrubbed string to see if it's a palindrome using your original code. So it would look something like this: ...