Create ex24.cpp