Cognizant Interview Question

A logic was given and had to write a program using that logic, it was simple.