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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
#include <iostream>
//using namespace std; // <--- Best not to use.
int main()
{
constexpr size_t ROWS = 3; // <--- Changed.
constexpr size_t COLS = 6; // <--- Changed.
char shape1[ROWS][COLS] // <--- Changed.
{
{'Ú', 'Ä', 'Ä', 'Ä', 'Ä', '¿'},
{'³', ' ', ' ', ' ', ' ', '³'},
{'À', 'Ä', 'Ä', 'Ä', 'Ä', 'Ù'}
};
char shape2[3][6] = { {' ', ' ', ' ', ' ', ' ', ' '}, {' ', ' ', ' ', ' ', ' ', ' '}, {' ', ' ', ' ', ' ', ' ', ' '} };
for (size_t row = 0; row < ROWS; row++)
{
for (size_t col = 0; col < COLS; col++)
{
std::cout << shape1[row][col];
}
std::cout << std::endl;
}
//for (int col = 0; col < ROWS; ++col)
// cout << "━━";
//cout << "-";
//for (int space = 1; space <= 13; space++)
// cout << " ";
//for (int col = 0; col < ROWS; ++col)
// cout << "━━";
//cout << "-\n";
//for (int row = 0; row < COLS; ++row)
//{
// cout << "┃ ";
// for (int col = 0; col < ROWS; ++col)
// cout << shape1[row][col] << " ┃ ";
// for (int space = 1; space <= 12; space++)
// cout << " ";
// cout << "┃ ";
// for (int col = 0; col < ROWS; ++col)
// cout << shape2[row][col] << " ┃ ";
// cout << '\n';
// for (int col = 0; col < ROWS; ++col)
// cout << "━━";
// for (int space = 1; space <= 14; space++)
// cout << " ";
// for (int col = 0; col < ROWS; ++col)
// cout << "━━";
// cout << "-\n";
//}
//system("pause"); // <--- Best not to use.
// <--- Used mostly for testing in Debug mode. Removed if compiled for release.
// <--- Used to keep the console window open in Visual Studio Debug mode.
// The next line may not be needid. If you have to press enter to see the prompt it is not needed.
//std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); // <--- Requires header file <limits>.
std::cout << "\n\n Press Enter to continue: ";
std::cin.get();
return 0;
}
|