Logical expression interpreter

there is a problem ,and i need help .