If 9 out of 10 fish have a red stripe, this means that 90% of the fish in the tank have red stripes.
Given that there are 18 fish with red stripes, we can set up an equation to find the total number of fish in the tank.
Let \( x \) be the total number of fish in the tank. According to the information provided:
\[ 0.9x = 18 \]
To solve for \( x \), divide both sides by 0.9:
\[ x = \frac{18}{0.9} = 20 \]
Therefore, the total number of fish in the tank is 20.