Cognizant Interview Question

Basic coding on any language