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

whats wrong in this plzz comment it out

modifide code


your bugs are not big
you have forgot two braces of while loop
and doesn’t declare n

the major mistake you are doing is lack of indentation
you can compare my code with your’s you find a difference while reading

The purpose of code indentation and style is to make the program more readable and understandable. It saves lots of time while we revisit the code and use it.

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.