10. Odd Even Sum
using System.Diagnostics.CodeAnalysis;
int n = int.Parse(Console.ReadLine());
int sum = 0;
int sum1 = 0;
for (int i = 1; i <= n; i++)
{
int g = int.Parse(Console.ReadLine());
if (sum <= sum1) // Или да направя проверка с (g%2 == 0)
{
sum += g;
}
else
{
sum1 += g;
}
}
if (sum == sum1)
{
Console.WriteLine("Yes");
Console.WriteLine($"Sum = {sum}");
}
else if (sum > sum1)
{
Console.WriteLine("No");
int sum2 = sum - sum1;
Console.WriteLine($"Diff = {sum2}");
}
else if (sum < sum1)
{
Console.WriteLine("No");
int sum3 = sum1 - sum;
Console.WriteLine($"Diff = {sum3}");
}