20

Document Sample
20 Powered By Docstoc
					#include<iostream.h> #include<conio.h> #include<fstream.h> fstream f("mat.in",ios::in); fstream g("transp.out",ios::out); void main() { clrscr(); int a[10][10],n,i,j,c[10][10],s; f>>n; for(i=1;i<=n;i++) for(j=1;j<=n;j++) f>>a[i][j]; for(i=1;i<=n;i++) { for(j=1;j<=n;j++) cout<<a[i][j]; cout<<endl; } cout<<endl; for(i=1;i<=n;i++) {for(j=1;j<=n;j++) c[i][j]=a[j][i]; } for(i=1;i<=n;i++) for(j=1;j<=n;j++) g<<c[i][j]; getch(); }


				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:15
posted:11/2/2008
language:
pages:1