I have this code that calculates the average of an amount of values.The problem occurs when i try to run the .exe file, the questions go on normally until the point where it should tell you the average, thats where the console crashes (this also happens when tring to run simple "hello word" code).Heres a bit of the code:
Console.WriteLine("Quantos valores serão calculados?"); QDV = Console.ReadLine(); QuantidadeDeValores = Convert.ToInt32(QDV); for(cont=1;cont<=QuantidadeDeValores;cont++) { Console.Clear(); Console.WriteLine("Informe o valor: "); valor = float.Parse(Console.ReadLine()); soma = soma + valor; } media = soma / QuantidadeDeValores; Console.WriteLine("A média dos valores inseridos é:{0:N}",media); Console.WriteLine("Arrivederci!"); } }}
Tried "publishing" it multiple times on multiple folders, also, the program runs normally on the terminal in vscode
Thank you in advance!