Need a project done?

C++ Programming Developer

Search This Blog

Vowel words counter C++


#include <iostream>
using namespace std;

void main(){
int c = 0;
char a[100];
cin >> a;
for (int i = 0 ; i<100; i++){
if (a[i] == 'a' || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' || a[i] == 'u') {
c++;
}
}
cout << c << endl;
}

No comments:

Post a Comment

"Don't let anyone ever make you feel like you don't deserve what you want."