Fombitz thought you meant all solutions, but you probably meant only solutions (x,y) where x and y are both whole numbers: 3x + 7y = 999 Write all the numbers in terms of the nearest multiple to the absolute value of the coefficient of the variable with the smallest absolute value that are not already a multiple of it: Of the numbers 3, 7, 333, only 7 is not a multiple of 3, so we write 7 in terms of its nearest multiple of 3, which is 6. So we write 7 as 6+1 3x+(6+1)y = 999 3x+6y+y = 999 WE divide every term by 3 x+2y+y/3 = 333 y/3 = 333-x Since 333-x is a non-negative integer, so is y/3. Let the integer be A, then 333-x = A and y/3 = A So y = 3A We substitute that in 3x + 7y = 999 3x + 7(3A) = 999 3x + 21A = 999 Divide through by 3 x + 7A = 333 x = 333-7A Now since x >= 0, 333-7A >= 0 -7A >= -333 A <= 333/7 = 47 4/7 A <= 47 Also since y >= 0 3A >= 0 A >= 0 So there are 48 solutions from A = 0 through 47 inclusively. Edwin