In a class 30 students pass in maths, 20 pass in physics and 8 pass in both. Find the number of students failed in both if the total students are 45.

45-(30+20-8) = 3

To find the number of students who failed in both subjects, we need to subtract the students who passed in both from the total number of students.

First, let's find the number of students who passed in at least one subject. We know that 30 students passed in math, 20 students passed in physics, and 8 students passed in both. To calculate the number of students who passed in at least one subject, we need to add the number of students who passed in math and physics and then subtract the number of students who passed in both:

Pass in at least one subject = (Pass in math) + (Pass in physics) - (Pass in both)
Pass in at least one subject = 30 + 20 - 8
Pass in at least one subject = 42

Now, we can find the number of students who failed in both subjects by subtracting the number of students who passed in at least one subject from the total number of students:

Failed in both = Total students - Pass in at least one subject
Failed in both = 45 - 42
Failed in both = 3 students

Therefore, 3 students failed in both math and physics.