Problem 4

Signed-off-by: Thameera Senanayaka <thameera123@gmail.com>