TEMA
compilation error c#
rsanzio preguntado 4 years ago
Porque estou recebendo compilation error sendo que na IDE o valor sai normalmente
using System;
using System.Collections.Generic;
using System.Text;
using System.Globalization;
namespace URI
{
class SomaImpares2
{
static void Main(string[] args)
{
int caseTests = Convert.ToInt32(Console.ReadLine());
int[] vetorImp = new int[caseTests];
for (int i = 0; i < caseTests; i++)
{
string[] input = Console.ReadLine().Split(" ");
int x = int.Parse(input[0]), y = int.Parse(input[1]);
int sumImp = 0;
if (x < y)
{
for (int j = x + 1; j < y; j++)
{
if (j % 2 != 0)
{
sumImp += j;
}
}
}
else
{
for (int j = y + 1; j < x; j++)
{
if (j % 2 != 0)
{
sumImp += j;
}
}
}
vetorImp[i] = sumImp;
}
for (int i = 0; i < caseTests; i++)
{
Console.WriteLine(vetorImp[i]);
}
}
}
}