Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # include <iostream>
- using namespace std;
- #include <iomanip>
- #include <math.h>
- #include <cmath>
- #include <string>
- int main()
- {
- string str;
- getline(cin, str);
- int b = str.length();
- int score=0;
- for (int i = 0; i < b; i++)
- {
- if (str[i] == 'a')
- {
- score = score + 1;
- }
- else if (str[i] == 'e')
- {
- score = score + 2;
- }
- else if (str[i] == 'i')
- {
- score = score + 3;
- }
- else if (str[i] == 'o')
- {
- score = score + 4;
- }
- else if (str[i] == 'u')
- {
- score = score + 5;
- }
- }
- cout << score << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement