Translate the following inference to logic notation: If Charles plays a game, then it is cloudy. If it is cloudy, then Mary is reading a book. It is not cloudy. If Mary reads a book, then Charles is playing a game. Therefore Mary is not reading a book.
p -> q. q -> r. ~q. r -> p. Therefore ~r.