These are chat archives for Codewars/codewars.com/kata-solving-help

7th
Nov 2016
Johnny
@JohnnyBizzel
Nov 07 2016 08:32
@slothpie Thanks. I must have had another issue. My original code is working now.
Ze-Marcos
@MarkSchemmer
Nov 07 2016 21:46
@slothpie or anybody else
I have a question about how to insert a array into a object array
That is the link to the problem
Johnny
@JohnnyBizzel
Nov 07 2016 23:44
Absolutely no clue what is wrong with this C# code:
using System;
using System.Collections.Generic;
using System.Linq;

public class Kata
{
    public static int[] CountPositivesSumNegatives(int[] input)
    {
      int acc = 0;
      int sumNeg = 0;
      if(input == null) return new int[] {};
      foreach (int num in input) {
        if (num < 0) { 
          sumNeg += num;
        } else {
          acc += 1;
        }     
      }
      int[] result = new int[] { acc, sumNeg };

        return input; //return an array with count of positives and sum of negatives
    }
}