Skip to content

Instantly share code, notes, and snippets.

@Todoviernes
Created May 31, 2022 03:02
Show Gist options
  • Save Todoviernes/c09c67b58575cad6f6c264c2efeb028f to your computer and use it in GitHub Desktop.
Save Todoviernes/c09c67b58575cad6f6c264c2efeb028f to your computer and use it in GitHub Desktop.
void main() {
final ages = [33, 15, 27, 40, 22];
ages.sort();
print("""
La edad mayor es ${ages[ages.length -1]}
La edad menor es ${ages[0]}
La edad promedio es ${ages.reduce((cur, next) => cur + next) / ages.length};
""");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment