Write a dart program that sorts a list of ints.
Details
The progam should:
read a list of ints from the user.
sort the list of ints from lowest to highest. It should not use the built-in sort, min, or max functions.
print the sorted list of ints.
The following program is an example of command line input and output using dart:
import 'dart:io';
void main(){
print("Enter a number: ");
var userInputString = stdin.readLineSync();
var userInputInt = int.parse(userInputString);
var doubleUserInput = userInputInt + userInputInt;
print("$userInputInt + $userInputInt = $doubleUserInput\n");
}
Example
How many numbers?: 3
Enter a number: 5
Enter a number: -1
Enter a number: 2
The numbers sorted are: [-1, 2, 5]