Please help me with this question
only upper part is done
Pattern Double sided arrows
Approach:
- In the given example, N=7 and the number of ROWS is 7.
- VERTICALLY, the pattern GROWS till ROW=N/2 and SHRINKS afterwards.
- ROW 1 has 4 ” “(SPACE) characters and then a value.
- The number of SPACE characters decreases whereas NUMERALS increase in count in each successive row.
- Also, note that the 1st value of the number placed in each row is the same as the number of the row.
- Also HORIZONTALLY the pattern has NUMERALS, then SPACES and NUMERALS afterwards.
Please check this code with comments and dry run it yourself you will get it https://ide.codingblocks.com/s/30137
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
Hey @LPU11910344
Your upper part logic is also incorrect
n=10 /7/ any number will give same upper part according to ur code
Please follow this
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.