A small bag of 10 identical apples weighs n ounces, and a large bag of n of these

apples weighs less than 40 ounces, where n is an integer. In ounces, what is
the greatest possible weight of the large bag? Express your answer as a mixed
number.

Let's say the weight of one apple is $w$ ounces. Then the weight of the small bag of 10 apples is $10w=n$ ounces.

The weight of the large bag of $n$ apples is $nw=n \cdot w$ ounces.

We want to find the greatest possible value of $nw$, but we know that $n$ is an integer. In order for $nw$ to be less than 40 ounces, $w$ must be less than $\frac{40}{n}$ ounces.

So if we want to maximize $nw$, we want to minimize $w$. The smallest positive value of $w$ is when $w=\frac{40}{n+1}$.

Therefore, the greatest possible weight of the large bag is $\frac{40}{n+1}\cdot n$ ounces.

To express this answer as a mixed number, we divide $n$ into 40.

Since we want to maximize the weight, we want to minimize the number of apples, which means $n$ should equal 1.

So, the greatest possible weight of the large bag is $\frac{40}{1+1}\cdot 1 = \frac{40}{2}= \boxed{20}$ ounces.