Since the variation is direct, then we have a function of the form:
![c = kn](https://img.qammunity.org/2019/formulas/mathematics/middle-school/9b8smmhuhm7c6r1f3x5e9wh9osvkya6n83.png)
From here, we must find the value of the constant k.
For this, we use the following data:
c = $ 54 when n is 9
Substituting values we have:
![54 = k (9)](https://img.qammunity.org/2019/formulas/mathematics/middle-school/eayy4f681d00xph3x9fiaenf5j3n1c1vho.png)
From here, we clear the value of k:
![k = 54/9 k = 6](https://img.qammunity.org/2019/formulas/mathematics/middle-school/m59nkdafih09wfxoklc5no92p9z4y6jt2f.png)
Therefore, the function is:
![c = 6n](https://img.qammunity.org/2019/formulas/mathematics/middle-school/i7n5qt9a2fcdz98bdi47hp3fzlbroeefc5.png)
For n = 3 we have:
Answer:
the cost of the sandwiches when n is 3 is:
c = 18 $