int main() { bool flag = false; while (true) { char space = ' ', asterisk = '*'; int s = 11, a = 1, i, j; while (s != 0) { i = s; while (i--) cout << space; j = a; while (j--) cout << asterisk; cout << '\n'; --s; a += 2; if (flag) break; } if (flag) break; flag = true; } cin.get(); }
using namespace std;
int main() {
bool flag = false;
while (true) {
char space = ' ', asterisk = '*';
int s = 11, a = 1, i, j;
while (s != 0) {
i = s;
while (i--) cout << space;
j = a;
while (j--) cout << asterisk;
cout << '\n';
--s;
a += 2;
if (flag) break;
}
if (flag) break;
flag = true;
}
cin.get();
}