We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
C# Code
static void plusMinus(List arr)
{
int total = arr.Count;
int positive = 0, negative = 0, zero = 0;
foreach (int num in arr)
{
if (num > 0)
positive++;
else if (num < 0)
negative++;
else
zero++;
Plus Minus
You are viewing a single comment's thread. Return to all comments →
C# Code static void plusMinus(List arr) { int total = arr.Count; int positive = 0, negative = 0, zero = 0; foreach (int num in arr) { if (num > 0) positive++; else if (num < 0) negative++; else zero++;
}