in a group of 86 students , each student is registered for at least one of 3 classes – history , math and english . 20 - 8 students are registered for history , 20 - 3 students are registered for math , and forty - 4 students are registered for english . if only 3 students are registered for all 3 classes , how many students are registered for exactly two classes ?
a u b u c = a + b + c - ab - bc - ac + abc 86 = 28 + 23 + 44 - ab - bc - ac + 3 = > ab + bc + ac = 12 exactly two classes = ab + bc + ac - 3 abc = 12 - 3 * 3 = 3 hence a
subtract(subtract(add(add(add(20, 3), add(20, 8)), add(multiply(4, const_10), 4)), multiply(3, 3)), subtract(86, 3))