Infobip Interview Question

Write a code for a simple task.