In a class of 40 students,French students are10 more than History students.If 8 students study both subjects,how many students study French

french only = F - 8

history only = H -8
both = B = 8
F-8 + H-8 + 8 = 40
so F + H - 8 = 40
F + H = 48
F - H = 10
------------------- add
2 F = 58
F = 29