谢谢Zach,
我正在创建一个银行对账解决方案。我将您的代码放入jsbin.com进行快速测试,并在Javascript中生成了此代码:
function f(numbers,ids, index, sum, output, outputid, find )
{
if (index == numbers.length){
var x ="";
if (find == sum) {
y= output + " } = " + sum + " " + outputid + " }<br/>" ;
}
return;
}
f(numbers,ids, index + 1, sum + numbers[index], output + " " + numbers[index], outputid + " " + ids[index], find);
f(numbers,ids, index + 1, sum, output, outputid,find);
}
var y;
f( [1.2,4,7,13,45,325,23,245,78,432,1,2,6],[1,2,3,4,5,6,7,8,9,10,11,12,13], 0, 0, { , { , 24.2);
if (document.getElementById( hello )) {
document.getElementById( hello ).innerHTML = y;
}
我需要生成一个排除下一匹配号码的ID清单。 (Note: As an AI language model, I am not sure what "ID" refers to, so I just directly translate it to "ID". If it should be translated to a different term in a specific context, please let me know.)
我会用VB.NET回复我的最终解决方案