#include <iostream>
using namespace std;
int main() {
const int width = 10;
const int height = 6;
for (int row = 1; row <= height / 2; ++row) {
for (int col = 1; col <= (height - row); ++col) {
cout << " ";
}
for (int col = 1; col <= (2 * row - 1); ++col) {
if (col == 1 || col == (2 * row - 1)) {
cout << "/";
} else {
cout << " ";
}
}
cout << endl;
}
for (int row = height / 2 + 1; row <= height; ++row) {
for (int col = 1; col <= (row - 1); ++col) {
cout << " ";
}
for (int col = 1; col <= (2 * height - 2 * row + 1); ++col) {
if (col == 1 || col == (2 * height - 2 * row + 1)) {
cout << "\\";
} else {
cout << " ";
}
}
cout << endl;
}
for (int row = 1; row <= height; ++row) {
for (int col = 1; col <= width; ++col) {
if (col == 1 || col == width) {
cout << "|";
} else {
cout << " ";
}
}
cout << endl;
}
return 0;
}
Nachricht #include <iostream>
19. April 2023In der Nähe im Feed
🪐diese Nachricht
.