Cognizant Interview Question

Basic programming projects puzzles ,java,c