text: Loss when two items are sold at same price and same percentage profit / loss | C # implementation of above approach . ; Function that will find loss ; Driver Code ; Calling Function
code: class GFG { static void Loss ( int SP , int P ) { double loss = 0 ; loss = ( double ) ( 2 * P * P * SP ) / ( 100 * 100 - P * P ) ; System . Console . WriteLine ( " Loss ▁ = ▁ " + System . Math . Round ( loss , 3 ) ) ; } static void Main ( ) { int SP = 2400 , P = 30 ; Loss ( SP , P ) ; } }