I'm trying to get this program to work that will count the frequency of each vowel. Surely i am over looking something silly.
#include <iostream>
#include <string>
using namespace std;
int main(){
char sent[81];
cout << "Type up to an 80 character sentence." << endl;
cin.getline(sent, 81);
int a = 0;
int e = 0;
int i = 0;
int o = 0;
int u = 0;
int len = strlen(sent);
for (int count = 0; count < len; count++){
if (sent[count] == a){
a = a + 1;
}
else if (sent[count] == e){
e = e + 1;
}
else if (sent[count] == i){
i = i + 1;
}
else if (sent[count] == o){
o = o + 1;
}
else if (sent[count] == u){
u = u + 1;
}
}
cout << "There are " << a << " A's in that sentence." << endl;
cout << "There are " << e << " E's in that sentence." << endl;
cout << "There are " << i << " I's in that sentence." << endl;
cout << "There are " << o << " O's in that sentence." << endl;
cout << "There are " << u << " U's in that sentence." << endl;