Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cout << "Problem 4: " << endl;
- {
- grade = 60;
- calculateGrade(grade);
- }
- cout << "Problem 8: " << endl;
- {
- string str;
- cout << "Please enter a string: ";
- cin >> str;
- cout << endl;
- int length = str.length();
- int count = 0;
- int i = 0;
- //int letter;
- //letter = length / length - 1;
- for (i; i <= length; i++)
- {
- if (str.at(i) == 'a')
- count++;
- //if a vowel, count++
- }
- cout << "The number of lowercase vowels you have in the string is: " << count << endl;
- }
Add Comment
Please, Sign In to add comment