Skip to content

Instantly share code, notes, and snippets.

@maquinamiltop
Forked from jacobaraujo7/arrays.dart
Created September 6, 2021 17:16
Show Gist options
  • Save maquinamiltop/125042586a39ec51b935bfdfe818d85e to your computer and use it in GitHub Desktop.
Save maquinamiltop/125042586a39ec51b935bfdfe818d85e to your computer and use it in GitHub Desktop.
arrays.dart
import 'dart:io';
main(){
var nome = [];
bool condicao = true;
while (condicao) {
print("Digite o nome");
String text = stdin.readLineSync();
if(text == "sair"){
print("===== PROGRAMA FINALIZADO ====");
condicao = false;
} else {
nome.add(text);
}
print(nome);
print("\n");
}
// List<String> nomes = ["Jacob Moura", "Luiza Moura", "Sara Moura", "Jordana Moura"];
// nomes.add("Eurides Moura");
// nomes.add("André Moura");
// print(nomes);
// nomes.removeAt(1);
// print(nomes);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment