Docstoc

MATRIX C++

Document Sample
MATRIX C++ Powered By Docstoc
					#include <iostream.h>
#include <stdlib.h>

main()
{
int mat[2][3], row,col,maxr=2,maxcol=3;

for (row=0; row<=maxr; row++)
{
for (col=0; col<maxcol; col++)
{
cout<<"Enter the row & col ["<<row<<" , "<< col <<"]";
cin>>mat[row][col];
}
}
for (row=maxr; row>=0; row--)
{
for (col=0; col<maxcol; col++)
{
cout<<'\t'<<mat[row][col];
}
cout<<endl;
}

system("PAUSE");
}

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:5
posted:9/22/2012
language:Unknown
pages:1
Description: MATRIX C++