Hello ,
there are 12 combinations
num x y z
1 0 1 2
2 0 3 1
3 0 5 0
4 5 0 2
5 5 2 1
6 5 4 0
7 10 1 1
8 10 3 0
9 15 0 1
10 15 2 0
11 20 1 0
12 25 0 0
DIM x AS INTEGER, y AS INTEGER, z AS INTEGER, k AS INTEGER
'OPEN "c:\nosdevoirs\monnaie.sol" FOR OUTPUT AS #1
k = 0
FOR x = 0 TO 25
FOR y = 0 TO 5
FOR z = 0 TO 3
IF x + 5 * y + 10 * z = 25 THEN
k = k + 1
PRINT k, x, y, z
' PRINT #1, k, x, y, z
END IF
NEXT z
NEXT y
NEXT x
'CLOSE #1
END