in a class of 40 boys 18 passed business mathematics, 19 passed accounts, 10 passed economics, 6 passed accounts only, 5 passed business mathematics and accounts only, 2 passed accounts and economics only. how many passed in all three papers

To find out how many students passed in all three papers (business mathematics, accounts, and economics), we need to use the principle of inclusion-exclusion.

Let's break down the information provided:
- Total number of boys in the class: 40
- Number of boys who passed business mathematics: 18
- Number of boys who passed accounts: 19
- Number of boys who passed economics: 10
- Number of boys who passed both accounts and economics only: 2
- Number of boys who passed both business mathematics and accounts only: 5

To calculate the number of boys who passed in all three papers, we can start by adding up the numbers who passed individual subjects: 18 (business mathematics) + 19 (accounts) + 10 (economics). However, this count includes some students who passed only two subjects.

To address this, we need to subtract the number of students who passed two subjects:

- Number of boys who passed both accounts and economics only: 2
- Number of boys who passed both business mathematics and accounts only: 5

Subtracting these numbers: 18 + 19 + 10 - 2 - 5 = 40.

Therefore, 40 boys passed in all three papers.