Function to calculate Profit or loss
static void profitLoss ( int N , int M ) { if ( N == M ) Console . Write ( " No ▁ Profit ▁ nor ▁ Loss " ) ; else { float result = 0 ; result = ( float ) ( Math . Abs ( N - M ) ) / M ; if ( N - M < 0 ) Console . Write ( " Loss ▁ = ▁ - " + result * 100 + " % " ) ; else Console . Write ( " Profit ▁ = ▁ " + result * 100 + " % " ) ; } }