Added the correct ex3.cpp