using System;
using System.Windows.Forms;
class RandomInt
{
// main entry point for application
static void Main(string[] args)
{
int value;
string output = "";
Random randomInteger = new Random();
// loop times
for (int i = 1; i <= 20; i++)
{
// pick random integer between 1 and 6
value = randomInteger.Next(1, 7);
output += value + " "; // append value to output
// if counter divisible by 5, append newline
if (i % 5 == 0)
output += "\n";
} // end for structure
MessageBox.Show(output,
"Random Numbers from 1 to 6",
MessageBoxButtons.OK,
MessageBoxIcon.Information);
} // end Main
} // end class RandomInt

