10 *| ** Combi ** 20 *| Find 4 different positive integers a,b,c,d whose sum = N 30 *| and the total number of possible sets, n. 40 *| DP-J 30Nov94 50 : 60 MODE3 70 VDU14 80 PRINTTAB(30,3)"** Combi **" 90 PRINT'TAB(12)"This program is referred to in the text file EdCombi" 100 REM PRINTTAB(22)" See *DIR$.Software *TYPE EdCombi" 110 PRINT'"Lists all values of 4 different positive integers a,b,c,d which add up to N" 120 INPUT''"What is total, N ? "N 130 PRINT'TAB(9)"n a b c d" 140 n=0 150 REPEAT:a=a+1:b=a:c=a 160 REPEAT:b=b+1:IFc=a c=c+1 170 REPEAT:c=c+1 180 d=N-a-b-c 190 IFd>c n=n+1:PRINTn" ";a" ";b" ";c" ";d 200 UNTILd0 PRINT"Total of ";n" sets having sum = ";N ELSE PRINT"Not possible"