40% of the fruits at a fruit stall were mangoes and the rest were oranges.

When some mangoes were sold, 20% of all the fruits left were mangoes.
A total of 90 mangoes and oranges were left at the fruit stall. How many mangoes were sold?

To find out how many mangoes were sold, we first need to determine the total number of fruits at the stall initially.

Let's assume the total number of fruits at the fruit stall was x.

According to the given information, 40% of the fruits were mangoes. So, the number of mangoes initially was 40% of x, which can be written as 0.4x.

The remaining fruits at the stall were oranges, which accounted for 60% (100% - 40%) of the total fruits. So, the number of oranges initially was 60% of x, which can be written as 0.6x.

Now, when some mangoes were sold, 20% of all the fruits left were mangoes. This means that 20% of the remaining total number of fruits (x - sold mangoes) were mangoes. Therefore, the equation can be written as:

0.2(x - sold mangoes) = remaining mangoes

We know that the remaining number of mangoes and oranges at the fruit stall is 90. So we can write another equation:

0.4x + 0.6x = 90

Solving both equations will give us the values of x and sold mangoes. Let's solve them:

0.2(x - sold mangoes) = remaining mangoes
0.2(x - sold mangoes) = 90 - 0.4x

0.2x - 0.2(sold mangoes) = 90 - 0.4x
0.2x + 0.4x = 90 + 0.2(sold mangoes)

0.6x = 90 + 0.2(sold mangoes)
0.6x = 90 + 0.2s

0.6x - 0.2s = 90 (1)

0.4x + 0.6x = 90
1x = 90
x = 90

Substituting x = 90 in equation (1):

0.6(90) - 0.2s = 90
54 - 0.2s = 90
-0.2s = 90 - 54
-0.2s = 36
s = 36 / -0.2
s = -180

Since the number of sold mangoes cannot be negative, it indicates an error in calculations.

Please check the given information and calculations again to ensure accuracy.