Pergunta de entrevista da empresa Cognizant

Write two programs. Some profit Loss question