### please solve this in easy way....

1
232
34543
4567654
567898765
Solve what?
6789aba9876
789abcdcba987
89abcdefedcba98

?
Last edited on
 ``1234567891011121314151617181920212223242526272829303132333435363738`` ``````#include using std::cout; using std::endl; int main() { int i; int j = 0; int num = 2; int decrementOffset = 0; int counter = 1; for(i = 1; i < 6; i++) { for(j = i; j < num; j++) { ///If the loop is on the second row or higher if(i > 1) { ///If the value of J is the highest for that row, start decrmenting if(j >= num - counter) { decrementOffset += 2; } } cout<

 ``12345678910111213141516171819202122232425262728293031323334353637383940`` ``````#include #include #include #include #include using namespace std; int main() { stringstream seq; int j = 1; int k = 0; for(int i = 1; i < 6; i++) { seq << i; j = 1; while(j < i) { k = i + j; seq << k; j++; } while(k > i) { seq << k - 1; k--; } seq << std::endl; } std::cout<::max(), '\n'); return 0; };``````

 ``` 1 232 34543 4567654 567898765 Press Enter to exit ```
Last edited on
Do you mean this?
 ``1234567`` ``````#include int main() { std::cout << "1\n" "232\n" "34543\n" "4567654\n" "567898765"; return 0; }``````

or this?
 ``123456789`` ``````#include int main() { for (int i = 0; i < 5; ++i) //5 lines for (int j = 0; j < 2*i+1; ++j) std::cout << (j>i ? 3*i-j : i+j)+1 << (j==2*i ? "\n" : ""); return 0; }``````
 6789aba9876 789abcdcba987 89abcdefedcba98 ?

LOL!
@txtxtnt

What does the question mark and the colon do in line 7???
 What does the question mark and the colon do