[Solved] Age computation always off by one
Let father’s current age = f son’s current age = s let x years back, father was twice as old as son. then 2(s-x) = (f-x) => x = 2*s – f Note: if x comes negative, then after x years , father will be twice as old as son(test for input[25,5]) public static void … Read more