Set an array.
int[] array = new int[] { 50, 100, 150, 200, 250, 300, 350, 400 };
Now, if you will print this array using a loop and new line, then the arrays will be visible vertically.
To work it horizontally, use the Join() method and set spaces to separate array elements.
string.Join(" ", array)
Let us see the complete code.
using System; using System.Linq; using System.IO; class Program { static void Main() { int[] array = new int[] { 50, 100, 150, 200, 250, 300, 350, 400 }; Console.WriteLine(string.Join(" ", array)); } }
50 100 150 200 250 300 350 400