Untitled
unknown
plain_text
9 months ago
1.0 kB
4
Indexable
#include <iostream>
int main() {
for (int i = 1; i <= 23; i++) {
for (int j = 1; j <= 40; j++) {
if (i >= 1 && i <= 11 && j <= 30) {
if ((i == 1 && j == 1) || (j >= 2 && j <= 12 && (12 - i) == j)) {
std::cout << " ";
} else if ((i >= 1 && i <= 11 && j == 13)) {
std::cout << "|";
} else if ((j >= 14 && j <= 29 && (10 - i) == j)) {
std::cout << "*";
} else if (j == 30) {
std::cout << "*";
} else {
std::cout << " ";
}
} else if (j == 16) {
std::cout << "|";
} else if (i >= 12 && i <= 21 && j == 40) {
if ((j >= 15 && j <= 21)) {
std::cout << " ";
} else if (i >= 22 && i <= 23 && j == 38) {
std::cout << "-";
}
}
}
std::cout << std::endl;
}
return 0;
}Editor is loading...
Leave a Comment