+ 1
Whats wrong with this code.. plz help me out..
3 Answers
+ 2
I don't see problem in your code, except its poor indentation.
You need to run your code in an IDE such as Visual Studio for the interactivity.
On sololearn, codes are compiled at their server so you have to input everything before the app runs.
0
Gordon but it shows sm compilation errors... saying that "the name 'c' does not exist in the current context" in line 27 đ€đ€
Anyways.. Thanx a lot for ur answer đ
0
Demo (not fully solving the problem for you) :
https://code.sololearn.com/coxtyv6PwZSx/?ref=app
1. Fixing indentation until the problem.
2. My comment at line 44, 33, 21 of my code snippet)
3. Variable scope issues, your condition is using a variable declared in the do-while loop. Solution is to elevate the declaration and initialization to the functional scope.
4. You will need to do the same for your deposit() and withdraw()