for (i = 0; i <= 10; i++) {
cin.get(text);
if ( text == 'a' ||text == 'e' || text== 'i' ||text == 'o' || text == 'u' || text == 'A' || text == 'E' || text == 'I' || text == 'O' || text == 'U')
vowel++;
cout << vowel << endl;
}
return 0;
} // Function Main ()
Welcome to my Programming Assignment Six
In this program, I will count your vowel
in your sequence of letters
********************************************
How many letters would you like to enter? 3
Please letters here: a
Please letters here: s
Please letters here: d
You have 1 vowels here
Press any key to continue . . .
This is the second one:
*******************************************
Welcome to my Programming Assignment Six
In this program, I will count your vowel
in your sequence of letters
********************************************
How many letters would you like to enter? 5
Please letters here: u
Please letters here: i
Please letters here: o
You have 3 vowels here
Press any key to continue . . .
The first one seems right. In the second one, it supposes to ask the user enter the letters 5 times, but here it only asks 3 times then execute the loop. Does anyone know why? Please help me, thank you :):)