I'm assuming you're using SAS On Demand for Academics?
If so, then save your program in the system, making sure to note where you save it in the Servers Files and Folders pane. To save a program, click the floppy disk icon and save. It's a GUI so should be straightforward. Then go to the Servers Folders and Files pane in Studio. Find the program file and right click it. Then download the file.
If for some reason you cannot get that to work, copy the program to NotePad, save it but change the extension to .sas (from .txt) and upload that. It will be almost identical (Windows versus Unix file) but I doubt your prof will catch that.