Commit 3f7a5c7d authored by Michael's avatar Michael

JC

parent 960d300d
......@@ -14,7 +14,7 @@ main()
std::cerr << "Error 1: wrong number(must be odd number from 1->19).\n";
return 1;
}
const int ROW_LIMIT = (lineCount - 1) / 2;
const int ROW_LIMIT = lineCount / 2;
for (int row = -ROW_LIMIT; row <= ROW_LIMIT; ++row) {
const int columnLimit = ROW_LIMIT - std::abs(row);
for (int column = -ROW_LIMIT; column <= columnLimit; ++column) {
......
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