Printing out your program can be a pain and the Arduino IDE is not great .
Whilst struggling to learn Visual
studio with the Arduino add in ( and failing atm) - I did find out it can print out your Arduino sketch , nicely formatted with line numbers etc , fitted to the paper .
- just cut n paste your Arduino IDE sketch into a blank Arduino project !