Indent code inside braces by four spaces or one tab. This makes structure visible at a glance. Code inside main() should be indented so you can see it belongs inside the function. Proper indentation prevents mistakes as programs grow.
You will see which braces match which blocks without counting characters. Most editors auto-indent when you press enter after an opening brace. Use consistent indentation throughout your code.
Pick four spaces or one tab and stick with it. Mixing styles makes code harder to read and can hide bugs where braces do not match properly.