homework of NCKU Program Design (II)