0

******x****** *****xxx***** ****xxxxx**** ***xxxxxxx*** **xxxxxxxxx** *xxxxxxxxxxx* xxxxxxxxxxxxx

7th Sep 2016, 4:20 PM
rehan altaf
rehan altaf - avatar
2 Respuestas
+ 7
http://code.sololearn.com/cpf6MUnPGa98/#cpp #include <iostream> using namespace std; int main() { int n = 7; // number of rows you want // rows of the pattern for (int row = 0; row < n; row++) { // spaces ('*') to the left for (int j = 0; j < n - row - 1; j++) { cout << '*'; } // main pyramid for (int k = 0; k < row * 2 + 1; k++) { cout << 'x'; } // spaces ('*') to the right for (int l = 0; l < n - row - 1; l++) { cout << '*'; } cout << endl; } return 0; }
7th Sep 2016, 9:48 PM
Liam
Liam - avatar
21st Jul 2020, 1:15 AM
shubham kumar
shubham kumar - avatar