Commit 234d14c7 authored by Karine's avatar Karine

Exercise_05_06, Version4

parent e8d45a74
......@@ -4,18 +4,12 @@
int
main()
{
for(int i = -4; i <= 4; ++i) {
for(int j = -4; j <= 4; ++j) {
if(std::abs(i) + std::abs(j) <= 4) {
std::cout << "*";
}
else {
std::cout << " ";
}
for (int i = -4; i <= 4; ++i) {
for (int j = -4; j <= 4; ++j) {
std::cout << ((std::abs(i) + std::abs(j) <= 4) ? "*" : " ");
}
std::cout << std::endl;
}
return 0;
}
......
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