CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
using namespace std;
int main()
{
char a[100];
int j=0;
cout<<"Enter string \n";
cin.getline(a,100);
for(int i=0;a[i]!='\0';i++)
{
char c= tolower(a[i]);
switch(c)
case 'a':
case 'e':
case 'i':
case 'o':
case 'u':
j++;
}
cout<<"\nInput string is "<<a;
cout<<"\n\nNo. of vowel in input string is "<<j;
return 0;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run