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!!!!!

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

To solve this problem, we can use the following steps:

1. Let's assign variables to represent the attendance for each day:
- Monday: M
- Tuesday: T
- Wednesday: W
- Thursday: Th
- Friday: F
- Saturday: S

2. We are given that the average attendance from Monday to Wednesday was 39:
(M + T + W) / 3 = 39

3. We are also given that the average attendance from Wednesday to Saturday was 39.5:
(W + Th + F + S) / 4 = 39.5

4. We are given that the overall average attendance from Monday to Saturday was 40:
(M + T + W + Th + F + S) / 6 = 40

To find the attendance on Wednesday, we need to solve for W.

Let's simplify and solve the equations step by step:

1. (M + T + W) / 3 = 39
M + T + W = 39 * 3
M + T + W = 117 (Equation 1)

2. (W + Th + F + S) / 4 = 39.5
W + Th + F + S = 39.5 * 4
W + Th + F + S = 158 (Equation 2)

3. (M + T + W + Th + F + S) / 6 = 40
M + T + W + Th + F + S = 40 * 6
M + T + W + Th + F + S = 240 (Equation 3)

Now, we have a system of three equations with three unknowns. We can solve it using various methods like substitution or elimination.

Let's solve it by substitution:

Using Equation 1, we can express M + T as (117 - W):

4. (117 - W) + W + Th + F + S = 240
117 + Th + F + S = 240
Th + F + S = 240 - 117
Th + F + S = 123 (Equation 4)

Using Equation 4, we can express Th + F as (123 - S):

5. W + (123 - S) + S = 158
W + 123 - S + S = 158
W + 123 = 158
W = 158 - 123
W = 35

Therefore, the attendance on Wednesday was 35.

To find the attendance on Wednesday, let's represent the attendance on Monday as M, on Tuesday as T, on Wednesday as W, on Thursday as Th, on Friday as F, and on Saturday as S.

We can start by using the information given in the problem:

1. Average attendance from Monday to Wednesday was 39:
(M + T + W) / 3 = 39
Rewrite this as:
M + T + W = 39 * 3 = 117

2. Average attendance from Wednesday to Saturday was 39.5:
(W + Th + F + S) / 4 = 39.5
Rewrite this as:
W + Th + F + S = 39.5 * 4 = 158

3. The average attendance from Monday to Saturday was 40:
(M + T + W + Th + F + S) / 6 = 40
Rewrite this as:
M + T + W + Th + F + S = 40 * 6 = 240

Now, we have three equations with three unknowns:
M + T + W = 117
W + Th + F + S = 158
M + T + W + Th + F + S = 240

To solve these equations, we need to use algebraic manipulation. Subtract the first equation from the third equation to eliminate the variables M, T, and W:

(M + T + W + Th + F + S) - (M + T + W) = 240 - 117
Th + F + S = 123

Now we have two equations left:
W + Th + F + S = 158
Th + F + S = 123

By subtracting the second equation from the first, we can eliminate the variable Th:

(W + Th + F + S) - (Th + F + S) = 158 - 123
W = 35

Therefore, the attendance on Wednesday (W) is 35.