bonjour.
peut etre que cela t'aidera
Dim A(12)
Dim code AS LONG
DIM code2 AS LONG
DIM X AS LONG
CLS
COLOR 9
LOCATE 7,15
INPUT"Indicatif National :" , indic
LOCATE 9, 15
INPUT "Code Marque :", code
LOCATE 11, 15
INPUT "Code Produit ;",code2
FOR I =1 TO 12
IF 1 =1OR 1=3 OR I = 8 THEN
IF I < 3 THEN X =indic
IF I > 2 AND I < 8 THEN X = code
IF I > 7THEN X = code 2
END IF
A(I) = X MODE 10
X = X MOD 10
X = X \ 10
NEXT
SWAP A(1), A(2)
SWAP A(3), A(7)
SWAP A(4), A(6)
SWAP A(8), A(12)
SWAP A(9), A(11)
S = 10´((3* (A(2) +A(4) +A(6)+A(8)+A(10)+A¸(12))
+A(1)+A(3)+A(5)+A(7)+A(9)+A(11))
MOD 10)
LOCATE 17, 15
PRINT"La clé de controle est:";S