Answer to Question #107670 in C++ for sadee

Question #107670
Write a function that takes a string as parameter and returns true if the
string is a palindrome, if not, it returns false.
1
Expert's answer
2020-04-03T15:05:01-0400
bool Polinome(string st)
{
	for (int i = 0; i < st.length(); ++i)
		if (st[i] != st[st.length() - i - 1])
			return false;
	return true;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS