Réponses

Meilleure réponse !
2014-10-04T14:33:17+02:00
Bonjour,

En utilisant les nombres de 0 à 999 (inclus),
le chiffre ... apparaît ... fois
0 ====> 190
1 ====> 300
2 ====> 300
...
9 ====>300

1:300=>
1,10,11,11,12,13,14,15,16,17,
18,19,21,31,41,51,61,71,81,91,
100,101,101,102,103,104,105,106,107,108,
109,110,110,111,111,111,112,112,113,113,
114,114,115,115,116,116,117,117,118,118,
119,119,120,121,121,122,123,124,125,126,
127,128,129,130,131,131,132,133,134,135,
136,137,138,139,140,141,141,142,143,144,
145,146,147,148,149,150,151,151,152,153,
154,155,156,157,158,159,160,161,161,162,
163,164,165,166,167,168,169,170,171,171,
172,173,174,175,176,177,178,179,180,181,
181,182,183,184,185,186,187,188,189,190,
191,191,192,193,194,195,196,197,198,199,
201,210,211,211,212,213,214,215,216,217,
218,219,221,231,241,251,261,271,281,291,
301,310,311,311,312,313,314,315,316,317,
318,319,321,331,341,351,361,371,381,391,
401,410,411,411,412,413,414,415,416,417,
418,419,421,431,441,451,461,471,481,491,
501,510,511,511,512,513,514,515,516,517,
518,519,521,531,541,551,561,571,581,591,
601,610,611,611,612,613,614,615,616,617,
618,619,621,631,641,651,661,671,681,691,
701,710,711,711,712,713,714,715,716,717,
718,719,721,731,741,751,761,771,781,791,
801,810,811,811,812,813,814,815,816,817,
818,819,821,831,841,851,861,871,881,891,
901,910,911,911,912,913,914,915,916,917,
918,919,921,931,941,951,961,971,981,991,



merci mais est ce que c'est bon
Prends ton courage à 2 mains et vérifie!
DIM a(9) AS INTEGER, f(9) AS STRING, k(9) AS INTEGER
DIM i AS INTEGER, s AS STRING, j AS INTEGER, x AS INTEGER
FOR i = 0 TO 9: k(i) = 0: a(i) = 0: f(i) = "": NEXT i
FOR i = 0 TO 999
s = ToStr$(i)
FOR j = 1 TO LEN(s)
x = VAL(MID$(s, j, 1)): a(x) = a(x) + 1: k(x) = k(x) + 1: f(x) = f(x) + ToStr$(i) + ","
IF k(x) > 9 THEN f(x) = f(x) + CHR$(13): k(x) = 0
NEXT j
NEXT i
FOR i = 0 TO 9: f(i) = ToStr$(i) + ":" + ToStr$(a(i)) + "=>" + CHR$(13) + f(i): PRINT f(i): NEXT i
END

FUNCTION ToStr$ (p AS INTEGER)
ToStr$ = LTRIM$(STR$(p))
END FUNCTION
j'ai rien compris