Several Programs in C++