Ta démarche : Tu devra la trouver moi j'ai fais avec la technique suivante, j'ai appliquer la technique la régle des 9 sur chacun des nombres j'ai calculer le totaux des chiffres que ce soit 1895 ou autre faut que tu calcule 1 + 8+ 9 + 5 = 23 et tu as ta table de 9 tu cherche si 9 x ... = 23 si oui, ton nombre 1895 est dans la table de 9, tu peux ensuite vérifié a la calculette ;) voilà pour ta réponse Bonne journée pose moi des questions si tu n'a pas compris ma technique
CONST COL = 7 CONST LIG = 15 DATA "Paris","Lyon","Marseille","Strasbourg","Bruxelles","Geneve","Luxembourg"
DATA "Amsterdam","Barcelone","Berlin","Bruxelles","Copenhague","Lisbonne","Luxembourg","Marseille","Mila","Munich" DATA "Naples","Nice","Prague","Rome","Stuttgart"
DATA 514,995,1323,683,220,1014,429 DATA 1125,644,515,1072,1419,758,1153 DATA 1094,1289,1584,801,782,1141,767 DATA 294,671,999,488,0,674,220 DATA 1329,1586,1914,1158,1035,1531,1106 DATA 1786,1784,1781,2212,2080,2024,2192 DATA 348,509,873,224,220,492,0 DATA 809,328,0,814,999,443,837 DATA 850,494,587,511,934,412,708 DATA 827,753,1034,371,811,591,543 DATA 1764,1299,1189,1425,1848,1326,1622 DATA 921,440,227,868,1277,483,949 DATA 1094,1116,1397,638,911,954,746 DATA 1531,1066,956,1192,1615,1093,1389 DATA 621,667,948,165,641,505,325
DIM SHARED Ville_A(COL) AS STRING, Ville_B(LIG) AS STRING, dist(LIG, COL) AS INTEGER
CALL Init CALL Traiter END
SUB Init SHARED Ville_A() AS STRING, Ville_B() AS STRING, dist() AS INTEGER DIM i AS INTEGER, j AS INTEGER
RESTORE FOR i = 1 TO COL: READ Ville_A(i): NEXT i FOR i = 1 TO LIG: READ Ville_B(i): NEXT i FOR i = 1 TO LIG: FOR j = 1 TO COL: READ dist(i, j): NEXT j: NEXT i END SUB
SUB Traiter SHARED Ville_A() AS STRING, Ville_B() AS STRING, dist() AS INTEGER DIM i AS INTEGER, j AS INTEGER DIM k AS INTEGER OPEN "c:\devoir\c6le.txt" FOR OUTPUT AS #1 k = 0 FOR i = 1 TO LIG FOR j = 1 TO COL IF dist(i, j) MOD 9 = 0 THEN k = k + 1 PRINT k, Ville_B(i); "-"; Ville_A(j); "="; dist(i, j) PRINT #1, k, Ville_B(i); "-"; Ville_A(j); "="; dist(i, j) END IF NEXT j NEXT i CLOSE #1 END SUB
0 votes Thanks 0
c6le39
Merci beaucoup mais je comprend pas tous tu peut mieux m'expliquer stp
Lista de comentários
Verified answer
Paris--->Barcelone
Barcelone--->Bruxelles
Copenhague--->Bruxelles
Ta démarche : Tu devra la trouver moi j'ai fais avec la technique suivante, j'ai appliquer la technique la régle des 9 sur chacun des nombres j'ai calculer le totaux des chiffres que ce soit 1895 ou autre faut que tu calcule 1 + 8+ 9 + 5 = 23 et tu as ta table de 9 tu cherche si 9 x ... = 23 si oui, ton nombre 1895 est dans la table de 9, tu peux ensuite vérifié a la calculette ;) voilà pour ta réponse Bonne journée pose moi des questions si tu n'a pas compris ma technique
1 Amsterdam-Marseille= 1323
2 Barcelone-Paris= 1125
3 Berlin-Marseille= 1584
4 Berlin-Strasbourg= 801
5 Bruxelles-Marseille= 999
6 Bruxelles-Bruxelles= 0
7 Copenhague-Bruxelles= 1035
8 Luxembourg-Marseille= 873
9 Luxembourg-Luxembourg= 0
10 Marseille-Marseille= 0
11 Marseille-Bruxelles= 999
12 Marseille-Luxembourg= 837
13 Naples-Paris= 1764
14 Prague-Lyon= 1116
15 Prague-Geneve= 954
16 Stuttgart-Paris= 621
CONST COL = 7
CONST LIG = 15
DATA "Paris","Lyon","Marseille","Strasbourg","Bruxelles","Geneve","Luxembourg"
DATA "Amsterdam","Barcelone","Berlin","Bruxelles","Copenhague","Lisbonne","Luxembourg","Marseille","Mila","Munich"
DATA "Naples","Nice","Prague","Rome","Stuttgart"
DATA 514,995,1323,683,220,1014,429
DATA 1125,644,515,1072,1419,758,1153
DATA 1094,1289,1584,801,782,1141,767
DATA 294,671,999,488,0,674,220
DATA 1329,1586,1914,1158,1035,1531,1106
DATA 1786,1784,1781,2212,2080,2024,2192
DATA 348,509,873,224,220,492,0
DATA 809,328,0,814,999,443,837
DATA 850,494,587,511,934,412,708
DATA 827,753,1034,371,811,591,543
DATA 1764,1299,1189,1425,1848,1326,1622
DATA 921,440,227,868,1277,483,949
DATA 1094,1116,1397,638,911,954,746
DATA 1531,1066,956,1192,1615,1093,1389
DATA 621,667,948,165,641,505,325
DIM SHARED Ville_A(COL) AS STRING, Ville_B(LIG) AS STRING, dist(LIG, COL) AS INTEGER
CALL Init
CALL Traiter
END
SUB Init
SHARED Ville_A() AS STRING, Ville_B() AS STRING, dist() AS INTEGER
DIM i AS INTEGER, j AS INTEGER
RESTORE
FOR i = 1 TO COL: READ Ville_A(i): NEXT i
FOR i = 1 TO LIG: READ Ville_B(i): NEXT i
FOR i = 1 TO LIG: FOR j = 1 TO COL: READ dist(i, j): NEXT j: NEXT i
END SUB
SUB Traiter
SHARED Ville_A() AS STRING, Ville_B() AS STRING, dist() AS INTEGER
DIM i AS INTEGER, j AS INTEGER
DIM k AS INTEGER
OPEN "c:\devoir\c6le.txt" FOR OUTPUT AS #1
k = 0
FOR i = 1 TO LIG
FOR j = 1 TO COL
IF dist(i, j) MOD 9 = 0 THEN
k = k + 1
PRINT k, Ville_B(i); "-"; Ville_A(j); "="; dist(i, j)
PRINT #1, k, Ville_B(i); "-"; Ville_A(j); "="; dist(i, j)
END IF
NEXT j
NEXT i
CLOSE #1
END SUB