Maths Assignment in c#