Cognizant Interview Question

Asked to code basic programs