the average attendance of a class from monday to wednesday was 39 and that from wednesday to saturday was 39.5. What was the attendance on wednesday, if the average attendance from monday to saturday was 40

I did this:-
m+t+w/3=39
w+Th+F+S/4=39.5
m+t+w+Th+F+S/6=40
-----------------------------------------------------------
m+t+w=39*3(cross multiplication)108
w+Th+F+S=39.5*4(")158
m+t+w+th+f+S=40*6(C.M)240
----------------------------------------------------------
Iam stuck from here!!!!!

1 answer

m+t+w=39*3 = 117 , (how did you get 108 ?)
w+th+f+s = 4*39.5 = 158
add them

m+t+2w+th+f+s = 275 , but
m+t+w+th+f+s = 9*40= 240
subtract them
w = 35