using static System.Console;
namespace ConsoleApplication1 {
public static void Main(string[] args) {
string[] names = new string[6];
WriteLine("Escolha:\n1 - adicionar\n2 - Visualizar\n 3 - Sair");
if (!int.TryParse(ReadLine(), out valor)) WriteLine("Opção inválida");
WriteLine("Escreva o nome do autor/grupo, nome do CD, ano de edição, nome da editora, total de tempo e número de faixas: ");
for (int i = 0; i < 6; i++) names[i] = ReadLine();
using var sw = new StreamWriter(@"C:\Users\gabri\Desktop\trabalho.txt");
for (int i = 0; i < 6; i++) sw.WriteLine(names[i]);
WriteLine("FICHEIRO .txt: \n");
using (var reader = File.OpenText(@"C:\Users\gabri\Desktop\trabalho.txt")) {
while ((line = reader.ReadLine()) != null) WriteLine(line);
if (valor == 3) WriteLine("Adeus");