1. If the appendix code is exemplary and used to show the running process of an algorithm or program, it is best to show it with screenshots. This can show the execution process and results of the code more clearly.
2. If the appendix code is a complete program code, it needs to be cited and explained in the paper, and it is best to copy and paste it into the appendix.