+ 1
after making the inverse triangle flat right. how to make an upside down triangle left and then combine the two into a perfectly
With the condition that number 1 must be in the middle https://code.sololearn.com/cfMDtFp5I9nG/?ref=app https://code.sololearn.com/cEVCjuMsJf7n/?ref=app
4 ответов
+ 4
How do you want the output to be? those two codes you show outputs the same triangles, I don't understand, what you mean by "number 1 must be in the middle"
Like this?
9 8 7 6 5 4 3 2 1
8 7 6 5 4 3 2 1 2
7 6 5 4 3 2 1 2 3
6 5 4 3 2 1 2 3 4
5 4 3 2 1 2 3 4 5
4 3 2 1 2 3 4 5 6
3 2 1 2 3 4 5 6 7
2 1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8 9
If not then write the expected output so I can understand you.
+ 3
for the question I asked, I already got the answer.
+ 1
thank you for the answer, sorry if my question is confused. And thank you this can be an additional reference for me
+ 1
Okay no problem, happy coding! : )