Ő a zseni
Alex Rider képek
Magyarázat: Alex Rider rajz (saját)A kép helyzete: 1of 10
Öltöztesd fel...
function numbers() {var nummenu = document.lotto.numbercount;var numbercount = nummenu.options[nummenu.selectedIndex].value*1;var maxnumbers = document.lotto.maxnum.value*1;if (numbercount > maxnumbers) {alert("Nem írtad be a Maximum számot!");}else {var ok = 1;r = new Array (numbercount);for (var i = 1; i <= numbercount; i++) {r[i] = Math.round(Math.random() * (maxnumbers-1))+1;}for (var i = numbercount; i >= 1; i--) {for (var j = numbercount; j >= 1; j--) {if ((i != j) && (r[i] == r[j])) ok = 0; } }if (ok) {var output = "";for (var k = 1; k <= numbercount; k++) {output += "Szám " + k + " = " + r[k] + "\n";}document.lotto.results.value = output} else numbers(); }}