Teraz troche zmodyfikowałem swój kod i użyłem tych StreamReader-ów
Kod daje mi poprawne wyniki ale dalej występuje ten sam błąd NZEC.. już sam nie wiem o co chodzi bo robiłem różne kombinacje i nic
[bbone=CSHARP,2465]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
class ArraysClass
{
public static void TabFunction()
{
//int t;//number of tests
StreamReader numTests = new StreamReader(Console.OpenStandardInput());
string test = numTests.ReadLine();
int t = int.Parse(test);
for (int i = 0; i < t; i++)
{
StreamWriter sw = new StreamWriter(Console.OpenStandardOutput());
StreamReader sr = new StreamReader(Console.OpenStandardInput());
string[] vals = sr.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
int n = 0;//number of array elements
n = int.Parse(vals[0]);
int[] Ar = new int[n];
for (int j = 0; j < Ar.Length; j++)
{
Ar[j] = int.Parse(vals[j+1]);
}
for (int j = 0; j < Ar.Length; j++)
{
if(j==Ar.Length-1)
{
sw.Write(Ar[Ar.Length - 1 - j]+"\n");
//Console.Write(Ar[Ar.Length - 1 - j]);
}
else
//Console.Write(Ar[Ar.Length - 1 - j] + " ");
sw.Write(Ar[Ar.Length - 1 - j]+ " ");
}
sr.Close();
sw.Close();
}
}
}
class Program
{
static void Main(string[] args)
{
ArraysClass.TabFunction();
}
}
[/bbone]