Penjumlahan Matriks

Januari 15, 2009

#include<iostream>
using namespace std;
int main ()
{

int x[2][2];
int    y[2][2];
int    z[2][2];
x[0][0]=1;
x[1][0]=2;
x[0][1]=3;
x[1][1]=4;
y[0][0]=3;
y[1][0]=7;
y[0][1]=4;
y[1][1]=8;
for (int i=0;i<2;i++)
{

for (int j=0;j<2;j++)
{
z[i][j]=x[i][j]+y[i][j];
cout<<z[i][j]<<endl;

}
}
return 0;
}

untitled

Hello world!

Januari 14, 2009

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!