Skip to content

Instantly share code, notes, and snippets.

@axurright
Last active November 3, 2024 23:05
Show Gist options
  • Select an option

  • Save axurright/68ec1e6a5cf5de4182189e10f8506419 to your computer and use it in GitHub Desktop.

Select an option

Save axurright/68ec1e6a5cf5de4182189e10f8506419 to your computer and use it in GitHub Desktop.
Array Generator in Dart.
import 'dart:io';
void main() {
print("Number 1: ");
String? number1 = stdin.readLineSync();
print("Analyzing...");
sleep(Duration(seconds: 5));
print("Done!");
sleep(Duration(seconds: 1));
print("Number 2: ");
String? number2 = stdin.readLineSync();
print("Analyzing...");
sleep(Duration(seconds: 5));
print("Done!");
sleep(Duration(seconds: 1));
print("Number 3: ");
String? number3 = stdin.readLineSync();
print("Analyzing...");
sleep(Duration(seconds: 5));
print("Done!");
sleep(Duration(seconds: 1));
print("Joining...");
sleep(Duration(seconds: 5));
var randomArray = [number1, number2, number3];
print("Done! Your array: ");
sleep(Duration(seconds: 1);
print(randomArray);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment