A trader buys some eggs at 15 naira each. she finds out that 5 of them are broken. She sells the rest at 20naira each and makes a profit of 340naira. How many eggs did she buy?

Let's assume the trader bought x number of eggs.

The cost of each egg is 15 naira, so the total cost of x eggs is 15x naira.
Out of the x eggs, 5 are broken, so she will sell x - 5 eggs.
She sells each egg for 20 naira, so the total revenue from selling x - 5 eggs is 20(x - 5) naira.
Her profit is the revenue minus the cost, which is 340 naira.
So, we can write the equation: 20(x - 5) - 15x = 340.
Expanding the equation: 20x - 100 - 15x = 340.
Combining like terms: 5x - 100 = 340.
Adding 100 to both sides: 5x = 440.
Dividing by 5 on both sides: x = 88.
Therefore, she bought 88 eggs.