Add tags

Add tags to the following comment
勉強し始めているので、とりあえず投稿
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
private function execute(n:int, m:int):void {
        var res:Array = [];
        for (var i:int = 0; i < m;) {
                var r:int = Math.floor(Math.random() * n);
                if (res.indexOf(r) >= 0) continue;
                i++;
                res.push(r);
        }
        Alert.show(res.toString());
}

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...