Please help me in finding the problem in code.
My code is not working
hello @yashsharma4304
the issue is with this inner while loop.

pls dry run on some small case to find why it is stucked in infinite loop
What do you mean by this. Could you please explain me?
i mean follow ur code for some small input.
it is running for infinite no of times
Yes I know that the inner loop is running infinite times because firstly it will do col++ then col-- due to which the condition of loop never goes wrong and the loop will never terminate.
But what is the solution to this problem?
use one counter for inner loop . i.e while(counter<=2*row-1)
increment it whenever u print .
Now that problem is solved. But it is not printing the required output. Could you please help me with that?
break each row into three parts.
part a) print 1 to row numbers
part b) print spaces
part c) print row to 1 numbers
Ok I will again make all conditions step by step. Thank you 