Can you write a C++ program to do the same thing?