dg Function

Calculates the contribution ratio, which based on the sales price and the purchase price.

NoteNote

If sale equals 0.0, the calculation cannot be made.



real dg(real sale, real purchase)

Parameter

Description

sale

The sale price.

purchase

The purchase price.

The contribution ratio.

// Returns the value 0.7.
dg(1000,300);
 
// Returns the value 0.45.
dg(20000, 11000);

Community Additions

ADD
Show: