+ 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; }
2 Respostas