+ 1

Can't fix this simple thing for an hours

What it should do: * *** ***** ******* ******* ***** *** * #include <iostream> using namespace std; int main() { int lines; cin >> lines; for (int end = 0; end < lines; end++) { //lines for (int vzostupne = 0; vzostupne < end * 2 + 1; vzostupne++) { cout << "*"; } cout << endl; } int cislo = lines * 2 + 1; for (int end = 0; end < lines; end++) { //lines for (int zostupne = 0; zostupne > cislo * 2 + 1; zostupne--) { cout << "*"; } cout << endl; } return 0; }

21st Jan 2021, 8:22 PM
Marko Eis
Marko Eis - avatar
2 Respuestas
0
Thanks!
21st Jan 2021, 10:02 PM
Marko Eis
Marko Eis - avatar