Here is a number machine.
Find the output when the input is 40
Find the input when the output is 25
83 exam-style questions on WJEC GCSE Maths Function Machines. Each one has a worked solution and a markscheme showing where the marks go.