Domanda di colloquio di Cognizant

Write two programs. Some profit Loss question