Data update
This commit is contained in:
parent
07c7092a52
commit
61b93a2cd1
313 changed files with 6160 additions and 346 deletions
11
Task/Pick-random-element/Dart/pick-random-element.dart
Normal file
11
Task/Pick-random-element/Dart/pick-random-element.dart
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import 'dart:math';
|
||||
|
||||
void main() {
|
||||
final array = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'];
|
||||
int i;
|
||||
|
||||
for (i = 1; i < 30; i++) {
|
||||
var intValue = Random().nextInt(i) % 10;
|
||||
print(array[intValue]);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue