ex2.cpp calculates the product of two numbers