Tech Mahindra interview question

Profit and loss,averages,1 question on coding