Cognizant Interview Question

Write two programs. Some profit Loss question