I installed the plugin code-Runner, normally if you get the gcc already installed and working would be working at the moment you install it.
https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner
You just click the play (or run) button, it will opens automatically a console inside the VS-Code and run the actual program.
If the problem is only with scanf persists, you can try this
Go to File > Preferences -> User Settings and add custom settings:
{
"code-runner.runInTerminal": true
}
Here's the source of the explanation: https://github.com/formulahendry/vscode-code-runner/issues/72
PDPs: Be careful, only accepts single file programs, in the beginning is useful, but maybe later would change to others more complex.