The total price of the melons is proportional to the number of melons.
Hence,
, where
is a constant of proportionality,
number of melons and
is the price.
From the given data,
From the above equations, we can see that the constant of proportionality is
.