Exercise 30.

Signed-off-by: Salil Kanitkar <slashforu@gmail.com>
Exercise 31.

Signed-off-by: Salil Kanitkar <slashforu@gmail.com>