Pattern hourglasss problem, im getting wrong pattern for the below part

You are updating the variables that are responsible for building the lower half every time means when the upper part is building then also the variables are changing.So update them in their respective if else block.
https://ide.codingblocks.com/s/113134 you can find here and compare your solution where to update.

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.