added source code examples to program.cpp