#include #include #include using namespace std; bool isPalindrome(char str[100]); bool isAlphaStr(char str[100]); int countChar(char str[100], char character); int main() { char str1[100]; char str2[100]; char str3[100]; char repeatedletter; cout << "Enter word that you would like to count repeated character of: "; cin >> str3; cout << endl; cout << "Enter letter you would like to find: "; cin >> repeatedletter; cout << endl; cout << countChar(str3, repeatedletter); cout << endl; cout << "ENter word where you want all alphabet: "; cin >> str2; cout << endl; if (isAlphaStr(str2) == true) { cout << "TRUE"; } else { cout << "FALSE"; } cout << endl; cout << "Enter Palindrome word: "; cin >> str1; if (isPalindrome(str1)) { cout << "true" << endl; } else { cout << "false" << endl; } } bool isPalindrome(char str[100]) { char tempString[100]; bool condition = true; int j = strlen(str) - 1; for (int i = 0; i < strlen(str); i++) { if (str[i] != str[j]) { condition = false; } j--; } return condition; } bool isAlphaStr(char str[100]) { for (int i = 0; i < strlen(str); i++) { if (!isalpha(str[i])) { return false; } } return true; } int countChar(char str[100], char character) { int amount = 0; for (int i = 0; i < strlen(str); i++) { if (str[i] == character) { amount++; } } return amount; }