Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<string>
- #include<cstdlib>
- #include<cstring>
- using namespace std;
- int main() {
- int k[2];
- string a;
- cin >> a;
- if (a.length() == 2) {
- for (int i = 0; i < 2; i++) {
- k[i] = a[i] - '0';
- }
- int u = k[0] * 10 + k[1];
- if (u < 21) {
- if (a[2] == 'A' || a[1] == 'F')
- cout << "window";
- else cout << "aisle";
- }
- else {
- if (a[2] == 'A' || a[2] == 'K')
- cout << "window";
- else if (a[2] == 'C' || a[2] == 'D' || a[2] == 'G' || a[2] == 'H')
- cout << "aisle";
- else cout << "neither";
- }
- }
- else {
- k[0] = a[0] - '0';
- if (k[0] < 3) {
- if (a[1] == 'A' || a[1] == 'D')
- cout << "window";
- else cout << "aisle";
- }
- else {
- if (a[1] == 'A' || a[1] == 'F')
- cout << "window";
- else cout << "aisle";
- }
- }
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment