Write a programe to find loss/profit % when CP is rs 500 and SP is ra 650. | Sololearn: Learn to code for FREE!

0

Write a programe to find loss/profit % when CP is rs 500 and SP is ra 650.

kindly answer this question fast.and let the programe b of low level. thanku

12/3/2016 12:45:39 PM

Subham Kumar

1 Answer

New Answer

+1

public class PL{ public static void main(String [] args){ double CP=500; double SP=650; double PROFIT; double LOSS; if(CP<SP){ PROFIT=((SP-CP)/CP)*100; System.out.println("profit is "+PROFIT+" %"); } else{ LOSS=((CP-SP)/CP)*100; System.out.println("profit is "+LOSS+" %"); } } }