Welcome to the Ranch
Another bit of good advice, but very counter‑intuitive.
You will find your indentation and brace matching much easier of you get a decent text editor (eg gedit, kate, NotePad2, jEdit, NotePad++) and select its options to include:-
1: Bracket matching.2: Syntax highlighting (you can probably change the colours to suit yourself).3: Automatic indentation4: Automatic conversion of 1 tab → 4 spaces5: Right margin warning at not more than 120 charactersThe NotePad program which comes with Windows® is a very poor tool for programming, because it does not support those options (or didn’t when I last tried it), and has some nasty habits like adding .txt to files while you are not watching.
Once you have those features working, the most counter‑intuitive thing of all, is that you write much of your code
backwards