find profit and loss percentage in c programming