Some simple programs in C++