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.
int n = Convert.ToInt32(Console.ReadLine());
string[] arr_temp = Console.ReadLine().Split(' ');
int[] array_temp= Array.ConvertAll(arr_temp,Int32.Parse);
int PositiveNumbers= array_temp.Where(x=>x>0).ToList().Count;
int NegativeNubers=array_temp.Where(x=>x<0).ToList().Count;
int zeroNumbers=array_temp.Length-(PositiveNumbers + NegativeNubers);
Plus Minus
You are viewing a single comment's thread. Return to all comments →
int n = Convert.ToInt32(Console.ReadLine()); string[] arr_temp = Console.ReadLine().Split(' '); int[] array_temp= Array.ConvertAll(arr_temp,Int32.Parse); int PositiveNumbers= array_temp.Where(x=>x>0).ToList().Count; int NegativeNubers=array_temp.Where(x=>x<0).ToList().Count; int zeroNumbers=array_temp.Length-(PositiveNumbers + NegativeNubers);