Ive encountered an infinite loop while writing code for the water assignment of pset1
Yeah, I realise Ive made a complete mess. Now Im lost as to how I should proceed further. Also I did the same problem using if else structure and it worked (confirmed by check50). However in the walkthrough video for water a do while structure is mentioned for this problem, so do i need to have a do while structure or can I submit the if else one if im not able to do it using the former?
So from the suggestions commented below i tried writing a new code but im getting errors:
I dont understand why its saying that i havent initialised the variable a. Have i placed it wrong?