solve this simple exercise, you can choose whatever programming language you prefer