End of day version of ex3 cpp task