Question: Can anyone help me use a message box to display the random number and the square in two columns with a label for each?

```
    const int NUM_ROWS = 10;
    const int NUM_COLS = 2;

        int[,] randint = new int [NUM_ROWS,NUM_COLS];
        Random randNum = new Random();

        for (int row = 0; row < randint.GetLength(0); row++)
        {
            randint[row,0] = randNum.Next(1,100);
            randint[row,1] = randint[row,0]*randint[row,0];

        Console.Write(string.Format("{0,5:d} {1,5:d}\n", randint[row,0], randint[row,1]));

```

Answer: 
I have achieved it by adding reference of System.Windows.Forms to my console application and got the result you desired. Here is my code:

```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ConsoleApplication6
{
    class Program
    {
        static void Main(string[] args)
        {
            const int NUM_ROWS = 10;
            const int NUM_COLS = 2;

            int[,] randint = new int[NUM_ROWS, NUM_COLS];
            Random randNum = new Random();

            for (int row = 0; row < randint.GetLength(0); row++)
            {
                randint[row, 0] = randNum.Next(1, 100);
                randint[row, 1] = randint[row, 0] * randint[row, 0];

                Console.Write(string.Format("{0,5:d} {1,5:d}\n", randint[row, 0], randint[row, 1]));

                MessageBox.Show(string.Format("{0,5:d} {1,5:d}\n", randint[row, 0], randint[row, 1]));
                Console.ReadKey();
            }
        }
    }
}  

```

**My output:**  

![Output](https://i.stack.imgur.com/tLXc2.png)
Also though this is not asked but just in case to add reference to System.Windows.Form look right click on the references in your solution explorer and select .Net tab and then press ok after selecting the desired dll. Cheers!

![Adding ref](https://i.stack.imgur.com/jCuN7.png)
![Selecting desired reference](https://i.stack.imgur.com/kjcTC.png)
Start you project in :

```
Windows Forms Application -> C#

```

You can use `MessageBox` to help you solve your display content.