Skip to content

Commit 3f465e6

Browse files
committed
Feat: Solving exercise 2 and 3 of the third challenge
1 parent b42795e commit 3f465e6

File tree

1 file changed

+19
-0
lines changed
  • OOP/Creating my first application/3) Listas e Loops

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// 2 - Criar uma lista de bandas vazias e adicionar suas bandas prediletas em seguida;
2+
// 3 - Utilizar a estrutura FOR para mostrar todas as suas bandas preferidas no console.
3+
using System;
4+
using System.Collections.Generic;
5+
6+
class Bandas {
7+
static void Main(){
8+
List<string> bandas = new List<string>();
9+
10+
bandas.Add("Blink 182");
11+
bandas.Add("Sum 41");
12+
bandas.Add("A Day to Remember");
13+
bandas.Add("Green Day");
14+
15+
foreach(string banda in bandas){
16+
Console.WriteLine(banda);
17+
}
18+
}
19+
}

0 commit comments

Comments
 (0)