Smiley program in cpp