Simply write your code in an editor which supports copying code with formatting (e.g. as RTF), such as WordPad, Visual Studio, TextMate and Notepad++. You can then copy the code directly into Powerpoint, preserving the formatting and syntax highlighting.
I prefer using TextMate on OSX. In TextMate, simply highlight a section of code, then click Bundles > TextMate > Copy Selection as RTF
and paste this straight into Powerpoint. This will preserve the highlighting used by your TextMate theme, which you can change via View > Theme >
You can further mimic the font, which you can view in TextMate by View > Font >
After reading your suggestion, I suddenly thought of opening vscode.dev. It works! So the easiest way is to open vscode.dev now.