GIC interview question

add new feature to your code