Commit b2eda196 authored by Michael's avatar Michael

michael.davityan:exercise_05_24v9

parent 9bce2395
Error 1: wrong size value(must be odd number from 1->19).
Error 1: wrong size value (must be odd number from 1->19).
Error 1: wrong size value(must be odd number from 1->19).
Error 1: wrong size value (must be odd number from 1->19).
Error 1: wrong size value(must be odd number from 1->19).
Error 1: wrong size value (must be odd number from 1->19).
......@@ -7,11 +7,11 @@ main()
{
int rhombusSize;
if (::isatty(STDIN_FILENO)) {
std::cout << "insert rhombus size(must be odd number from 1->19): ";
std::cout << "Insert rhombus size (must be odd number from 1->19): ";
}
std::cin >> rhombusSize;
if (rhombusSize % 2 == 0 || rhombusSize < 1 || rhombusSize > 19) {
std::cerr << "Error 1: wrong size value(must be odd number from 1->19).\n";
std::cerr << "Error 1: wrong size value (must be odd number from 1->19).\n";
return 1;
}
const int rowLimit = rhombusSize / 2;
......
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