All pastes #28456 Raw Edit

Unnamed

public text v1 · immutable
#28456 ·published 2005-11-12 13:46 UTC
rendered paste body
#include <cstdlib>
#include <iostream>

using namespace std;

void PrintMatrix(double **m);
    
int main(int argc, char *argv[])
{
    double *a[2]; // rodykliu masyvas
    a[0] = new double [2];
    a[1] = new double [2];
    a[0][0]=2.0;
    a[0][1]=4.0;
    a[1][0]=7.0;
    a[1][1]=3.14;

    PrintMatrix(a);

    system("PAUSE");
    return EXIT_SUCCESS;
}

void PrintMatrix(double **m)
{
     for (int a = 0; a<2; a++)
     {
         for (int b = 0; b<2; b++)
         {
             cout << m[a][b] <<endl;
         }
     }
}