Commit 36355e81 authored by Michael's avatar Michael

michael.davityan:exercise_05_23v9

parent fa4fe739
......@@ -4,10 +4,11 @@
int
main()
{
const int ROW_LIMIT = 4;
for (int row = -ROW_LIMIT; row <= ROW_LIMIT; ++row) {
const int RHOMBUS_SIZE = 9;
const int rowLimit = RHOMBUS_SIZE / 2;
for (int row = -rowLimit; row <= rowLimit; ++row) {
const int columnLimit = 4 - std::abs(row);
for (int column = -ROW_LIMIT; column <= columnLimit; ++column) {
for (int column = -rowLimit; 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