Write a C# program to find the negative number in a sequence of numbers entered by the user inputs. In this solution, before reading the numbers, ask the user to input how many numbers will be input.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication5
{
class Program
{
static void Main(string[] args)
{
int n, co = 0;
Console.WriteLine("How Many Numbers Do You Want To Enter In Series ( +ive And -ive)s :");
n = Int32.Parse(Console.ReadLine());
int[] ipser = new int[n];
for (int i = 0; i < ipser.Length; i++)
{
Console.WriteLine("Enter The No {0} Element in Series Of {0}", i + 1, n);
ipser[i] = Int32.Parse(Console.ReadLine());
if (ipser[i] < 0)
co = co + 1;
}
Console.WriteLine("Negative Numbers In The series=" + co);



Console.ReadKey();

}


}
}


www.ittaleem.com