- 2

Palindrome and Vowels (c++)

Determine a palindrome using the concepts on: ~ array ~ function ~ branching (if-else) ~ C strings ~ characters INSTRUCTIONS: Copy the code below to your file (DO NOT ALTER the given code) Implement the isPalindrome and numberOfVowels function after the main function #include <iostream> #include <cstring> using namespace std; bool isPalindrome(char s[20] ); int numberOfVowels(char s[20]); int main() { char str1[20]; // storage of string cin >> str1; // input here if (isPalindrome(str1)) cout << "Palindrome" << endl; else cout << "Not a palindrome" << endl; cout << "No. of vowels: " << numberOfVowels(str1) << endl; return 0; }

9th Oct 2022, 3:55 AM
Ferdinand John
Ferdinand John - avatar
1 ответ
+ 1
This section is intended for programming related questions. That is: if you are trying to code something, but can't get past something, then you ask about it. Pls don't use this section to assign tasks to other users.
9th Oct 2022, 5:49 AM
Emerson Prado
Emerson Prado - avatar