挑选数据,已知几个数的和,如何从一列数中挑选出这几个数
如题所示,已知几个数的和,如何从一列数中挑选出这几个数例如:已知7个数的和是119,如何从“求和.xls”中找出这几个数
已知和是119,而且已知是7个数
如果有多个答案,将这几个答案全部列出来。
求和.rar
(1.86 KB)
CREATE CURSOR TT (x N(2)) FOR I=11 TO 32 INSERT INTO TT VALUES (I) ENDFOR SELECT A.X N1,B.X N2,C.X N3,D.X N4,E.X N5,F.X N6,G.X N7,000 HJ FROM TT A; INNER JOIN TT B ON B.X>A.X; INNER JOIN TT C ON C.X>B.X; INNER JOIN TT D ON D.X>C.X; INNER JOIN TT E ON E.X>D.X; INNER JOIN TT F ON F.X>E.X; INNER JOIN TT G ON G.X>F.X INTO DBF TTT REPLACE ALL HJ WITH N1+N2+N3+N4+N5+N6+N7 COUNT FOR HJ=119 TO MM BROWSE FOR HJ=119 TITLE "共有"+ALLTRIM(STR(MM))+"个组合" USE ERASE TTT.DBF