Statement:
write a program that creates a two dimensional array with 10 rows and 2 columns, The first column should be filled with 10 random numbers between 0 and 100.
* The second column should contain the squared value of the element found in column 1. Using the Show( ) method of the MessageBox class display a table
ok so im gonna have to implement the messagebox.show() line in my program, but i was wondering i already have made an array which will store 10 random values in the first column is there anything i can use which will pull data from their square it and display in the second column leading to a 10x3 array displaying what the question wants?
Thanks as always!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace twoDimTable
{
class Program
{
static void Main()
{
/// '10' denotes rows, '3' denotes columns
int[,] numTable = new int[10, 3];
numTable[10, 1] = 1;
numTable[10, 1] = 100;
numTable[10, 1] = 45;
numTable[10, 1] = 22;
numTable[10, 1] = 88;
numTable[10, 1] = 33;
numTable[10, 1] = 5;
numTable[10, 1] = 12;
numTable[10, 1] = 98;
numTable[10, 1] = 39;
DisplayInstructions();
} // end of main
/// <summary>
/// what i need is two make a two dimensional array, store 10 random values
/// in first column, and in second column the numbers from first column squared.
///
/// method to pull values from first column
/// method to draw the array
/// </summary>
public static void DisplayInstructions()
{
Console.WriteLine("This program will create a simple two dimensional array with 10 rows and 2 columns.");
Console.WriteLine("Press any key to continue....");
Console.ReadKey();
} // end of DisplayInstructions
public static DrawRows()
{
} // end of DrawRows
public static DrawTwoDimTable()
{
} // end of DrawTwoDimTable
{}
} // end of clas s
} // end of namespace