Mam problem z poniższym kodem, nie bardzo wiem jaki jeszcze warunek trzeba spełnić żeby było zaakceptowane. Niby wszystko dobrze wyświetla ale nie przechodzi testu na spoj:
using System;
using System.Linq;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
string text;
char[] tab = new char[200];
int a = 0;
int k = 0;
do
{
text = Console.ReadLine();
for (int i = 0; i < text.Length; i++)
{
int x = (int)text.ElementAt(i);
if (x >= 65 && x + 3 <= 90)
{
tab[k] = (char)((int)text.ElementAt(i) + 3);
}
else if ((x + 3) > 90 && (x + 3) <= 93)
{
tab[k] = (char)((int)text.ElementAt(i) + 3 - 26);
}
else if (x == 32)
{
tab[k] = (char)(int)text.ElementAt(i);
}
k++;
}
k++;
tab[k] = ‘\n’;
k++;
a++;
} while (text != null && text != “”);
for (int i = 0; i < k; i++)
{
Console.Write(tab[i]);
}
}
}
}