-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathniggers.cpp
More file actions
37 lines (30 loc) · 824 Bytes
/
Copy pathniggers.cpp
File metadata and controls
37 lines (30 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
string color;
int count = 0;
cout << "What is your favorite color? " << endl;
getline(cin, color);
int space = color.find(" ");
string small = color.substr(0, space);
if (small.empty()) {
cout << "You didn't type anything!" << endl;
return 1;
}
if (!all_of(small.begin(), small.end(), ::isalpha)) {
cout << "Stop typing numbers/symbols!" << endl;
return 1;
}
transform(small.begin(), small.end(), small.begin(), ::tolower);
if (small == "black" || small == "brown") {
while(count < 10) {
cout << "Fuck you Nigga!" << endl;
count++;
}
} else {
cout << "Wow!";
}
return 0;
}