Commit de75dfc8 authored by Michael's avatar Michael

michael.davityan:exercise_05_23new

parent 84e0b90f
*
***
*****
*******
*********
*******
*****
***
*
*
***
*****
*******
*********
*******
*****
***
*
......@@ -7,9 +7,9 @@ main()
const int ROW_LIMIT = 4;
const int rowBegin = -4;
for (int row = rowBegin; row <= ROW_LIMIT; ++row) {
const int COLUMN_LIMIT = 4 - std::abs(row);
for (int column = rowBegin; column <= COLUMN_LIMIT; ++column) {
std::cout << (column < -COLUMN_LIMIT ? " " : "*");
const int columnLimit = 4 - std::abs(row);
for (int column = rowBegin; column <= columnLimit; ++column) {
std::cout << (column < -columnLimit ? " " : "*");
}
std::cout << std::endl;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment