Created
May 3, 2022 12:42
-
-
Save developerjamiu/1c88201e80353446ccc063a4853bf86f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
main() { | |
var rng = Random(); | |
final list = <int>[]; | |
while (list.length < 10) { | |
final int randomNumber = rng.nextInt(100); | |
if (list.contains(randomNumber)) continue; | |
list.add(randomNumber); | |
} | |
print(list); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment