added p18 c solution