Please help me fix the error in my code

Please send me the reply correcting my code

hello @shresth_2000
image

here it should be i.

also i think there is some logical error in ur code.
Approach:

  1. In the given example, N=7 and the number of ROWS is 7.
  2. VERTICALLY, the pattern GROWS till ROW=N/2 and SHRINKS afterwards.
  3. ROW 1 has 4 ” “(SPACE) characters and then a value.
  4. The number of SPACE characters decreases whereas NUMERALS increase in count in each successive row.
  5. Also, note that the 1st value of the number placed in each row is the same as the number of the row.
  6. 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

Please explain it without using arrays as i have not completed that topic

this is my code.please correct it

Please help me correct my code.It is passing only one test case.Please check it and help me

THIS IS MY IMPROVED CODE.ITS FAILING ONE TEST CASE OUT OF 7. IT IS FAILING TEST CASE 1.PLEASE HELP ME CORRECT MY CODE

hello @shresth_2000
ur logic is correct.

image

add some space in ur lower half rows to make it align with upper half

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.