Write a C program that counts the number of vowels and consonants in a given string.
Example Inputs & Outputs:
Enter the string: Hello World
Vowels: 3
Consonants: 7
Enter the string: C Programming
Vowels: 3
Consonants: 9
To solve this problem, follow these steps:
if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')
if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')
if (isalpha(ch) && !isVowel(ch))
Task: Implement the above logic and write a C program to count the number of vowels and consonants in a string.