Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- setlocale(LC_ALL, "Russian");
- unsigned char a[255];
- cin >> a;
- bool b = 0;
- for (int i = 0; b != 1; i++) {
- if (a[i] == 'm') {
- if (a[i + 1] == 'e') {
- if (a[i + 2] == 'm') {
- cout << "Это слово запрещено!";
- b = 1;
- }
- }
- }
- if (a[i] == 0) {
- cout << "Это слово разрешено!";
- b = 1;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement