Im not sure if this is exactly what your assignment is looking for but this is solving for X
4.6m questions
6.0m answers