public static int [] GetList(){
Random rG = new Random();
int[] nums= new int [100];
for (int pos = 0; pos<=99; pos++)
nums[pos] = rG.Next(-50, 51);
public static int Sum (int[] nList){
for (int pos = 1; pos<=99; pos++)
public static int Maximum (int [] nList){
for (int pos = 1; pos<=99; pos++){
public static int Minimum (int [] nList){
for (int pos = 1; pos<=99; pos++){
public static void Main()
Console.WriteLine("Welcome to the number generator");
Console.WriteLine(new String ('-',90));
Console.WriteLine("Here are the random numbers:");
int [] nList = GetList();
for (int pos = 0; pos<=99; pos++){
Console.Write(nList[pos] + ", ");
if (pos==19 || pos==39 || pos==59 || pos==79)
int max = Maximum (nList);
int min = Minimum (nList);
Console.WriteLine("Sum: " +sum);
Console.WriteLine("Max: " +max);
Console.WriteLine("Min: " +min);
Console.WriteLine("Average: "+avg);