Here you'll find the source code for a bunch of simple programs I've written. These are very handy things to save and keep on hand because they explain and notate many programming basics. I have them up here as much for me as for you, because I can grab them wherever I may need them.
You can copy and paste them as-is into your source code, but if you're learning to program, you'll benefit much more from actually typing the code out.
On to my code...