Selasa, 05 Juli 2011

Matrik

The matrix is a set amount (variables and constants) are arranged in rows and columns of rectangular. The matrix is a way of visualizing the variable which is a collection of numbers or other variables, such as vectors. With matrix representation, the calculation can be done with more structured. Utilization for example in explaining the linear equations, coordinate transformation, and others. Matrix as well as ordinary variables can be manipulated, like multiplied, summed, subtracted, and decomposed.
The matrix A consists of 6 rows and 2 columns. Therefore, the matrix A
said berordo 6 􀁵  2. The numbers contained in
matrix called the matrix elements. In matrix A, we can
write its elements as follows.
The elements in the first row is 1 and 3.
The elements in the second row is 1 and 4
Elements in the third row is 2 and 3.
Elements in the fourth row is 2 and 4.
Elements in the fifth row is 3 and 3.
Elements in the sixth row dalah 3 and 4



#include<iostream>
#include<conio.h>
int main (){
int i[50], j[50];
int a,b,c,d;
cout<<"masukkan data="; cin>>c;
for (a=0;a<c;a++){
cin>>i[a];}
cout<<"masukkan data=";cin>>d;
for (b=0;b<d;b++){
cin>>j[b];}
cout<<endl;
for (a=0;a<c;a++){
for (b=0;b<d;b++){
cout<<i[a]<<","<< j[b]<<endl;}
}
return 0;}

Tidak ada komentar:

Posting Komentar