Monday, 6 May 2013

Matriks 3x3 pendek




Matriks 3x3

Rumus:



#include

using namespace std;

int matrix[3][3];

int main()

{

    // asigning values, I suppose this is done allready.



    for(int x=0;x<3;x++)

    {

        for(int y=0;y<3;y++)

        {

            matrix[x][y]=1;

        }

    }



    // showing the matrix on the screen



    for(int x=0;x<3;x++)  // loop 3 times for three lines

    {

No comments:

Post a Comment