#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
string vowel[] = {"b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "z"};
string a;
while (a != "quit!") {
int b = 1;
cin >> a;
for (int i = 0; i < 20; i++) {
if (a.length() > 4 && a.substr(a.length() - 3 ) == vowel[i] + "or") {
a[a.length() - 2] = 'o';
a[a.length() - 1] = 'u';
a += 'r';
cout << a << "\n";
b = 0;
break;
}
//cout << i;
}
if (b == 1) {
cout << a << "\n";
}
}
}
For some reason, the entire program just stops if you enter a string that's length is greater than 4 and doesn't end with consonant + "or". The program never even goes in the if statement.