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

3rd Dec 2016, 12:45 PM
Subham Kumar
1 Resposta
+ 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+" %"); } } }
9th Dec 2016, 11:14 AM
Aditya
Aditya - avatar