cleaned up p39
added p40 c solution
added p41 c solution