class MainClass { public static void Main (string[] args) { int n = int.Parse(Console.ReadLine()); int positiveCount = 0; int negativeCount = 0;
for (int i = 0; i < n; i++) { int number = int.Parse(Console.ReadLine()); if (number > 0) { positiveCount++; } else if (number < 0) { negativeCount++; } } if (positiveCount > negativeCount) { Console.WriteLine("Положительных чисел больше"); } else if (negativeCount > positiveCount) { Console.WriteLine("Отрицательных чисел больше"); } else { Console.WriteLine("Количество положительных и отрицательных чисел равное"); } }
using System;
class MainClass {
for (int i = 0; i < n; i++) {public static void Main (string[] args) {
int n = int.Parse(Console.ReadLine());
int positiveCount = 0;
int negativeCount = 0;
int number = int.Parse(Console.ReadLine());
if (number > 0) {
positiveCount++;
} else if (number < 0) {
negativeCount++;
}
}
if (positiveCount > negativeCount) {
Console.WriteLine("Положительных чисел больше");
} else if (negativeCount > positiveCount) {
Console.WriteLine("Отрицательных чисел больше");
} else {
Console.WriteLine("Количество положительных и отрицательных чисел равное");
}
}
}