If you want to change the formatting such as having the if statements on one line, there’s a few ways to do it. The easiest way is to go to vscode settings ctrl + ,
and search c_cpp.clang and you should get a window like this
Yours may say Visual Studio
in the dialog box. I changed mine to { BasedOnStyle: Google, BreakBeforeBraces: Allman }
It can always be changed back.
Here’s a link to the docs on style options
Additionally, You can enable format on save. If you work on a team or on other’s code, linting and formatting are more important.