All pastes #2125470 Raw Edit

Miscellany

public text v1 · immutable
#2125470 ·published 2012-03-07 11:08 UTC
rendered paste body
using System;


class Array06
{

    static void Main()
    {
        //declare local variables
        double[] firstNumber = new double[15];
        double[] secondNumber = new double[15];
                
        double temp = 0;
        double total = 0;
        String message = "";
        double[,] myArray = new double[2, 15];

        Random rand = new Random();


         Console.WriteLine("One * Two   Product");

        for (int i = 0; i < 15; ++i)
        {
           
           firstNumber[i] = rand.NextDouble() * 100;

            secondNumber[i] = rand.NextDouble() * 100;
        }
        for (int row = 0; row < 2; ++row)
        {
          
            for (int col = 0; col < 15; ++col)
            {

                myArray[row, 0] = firstNumber[col];
                myArray[row, 1] = secondNumber[col];

                Console.Write("{0,8:N2}", myArray[row, 1] );
                
            }
        

        }