Https://ide.codingblocks.com/s/480689

In this solution of mine everything is working fine but its not printing the last number i don’t know why…

change the condition of while loop

Your Condition 
 while(start_col<end_col && start_row<end_row)`

Correct Condtion
 while(start_col<=end_col && start_row<=end_row)

it is not passing one test case now also

you swap the condition of line no 25 and 34

Modified Code

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.