Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Time time1 = Time();
- time1.nome = "Flamengo";
- time1.pontos = 0;
- Time time2 = Time();
- time2.nome = "Bahia";
- time2.pontos = 0;
- Time time3 = Time();
- time3.nome = "Santos";
- time3.pontos = 0;
- Time time4 = Time();
- time4.nome = "Gremio";
- time4.pontos = 0;
- Time time5 = Time();
- time5.nome = "Cruzeiro";
- time5.pontos = 0;
- Time time6 = Time();
- time6.nome = "Athelico PR";
- time6.pontos = 0;
- Random r = new Random();
- var retorno; //variavel do readLineSync
- List<Time> tp;
- tp.addAll(time1, time2);
- print("Times Cadastrados ${time1.nome} ${time2.nome} ${time3.nome} ${time4.nome} ${time5.nome} ${time6.nome}");
- // como imprimir todos os times sem ter que declarar 1 por um?
- // print(time1.nome);
- // print(time2.nome);
- retorno = stdin.readLineSync(); // Aperta uma tecla para prosseguir
- Time time11 = tp.removeAt(r.nextInt(tp.length));
- print(time11);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement