There are an infinite number of solutions to this problem. You have three unknowns (x,y,z) but only one equation, so the problem is underdetermined. You could rearrange the formula to express, for example, 'x' in terms of Num, y and z. Now pick arbitrary values for 'y' and 'z'. These two values, taken with the given 'Num' will give you a value for 'x'. Bob Ammerman RAm Systems ----- Original Message ----- From: "Thomas N" To: Sent: Monday, July 08, 2002 3:10 AM Subject: [OT]: C Question. Please help! > Hello everyone, > > How to I search for x, y, and z variables in the equation below to get the > answer that's closest to Num variable using C language? > > Num = x * ( y * (3*z + 4) + 4) + 18 > > For example, if num = 122. The answer for x is 2, y is 3, z is 4. > > Best regards, > Thomas > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.