18

Document Sample
18 Powered By Docstoc
					#include<iostream.h> #include<conio.h> #include<fstream.h> fstream f("matrice.in",ios::in); fstream g("matrice1.in", ios::in) ; void main() { clrscr(); int a[10][10],n,i,j,min,p,b[10][10],c[10][10]; 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; g>>n; for(i=1;i<=n;i++) for(j=1;j<=n;j++) g>>b[i][j]; for(i=1;i<=n;i++) { for(j=1;j<=n;j++) cout<<b[i][j]; cout<<endl; } cout<<endl; for(i=1;i<=n;i++) for(j=1;j<=n;j++) c[i][j]=a[i][j]+b[i][j]; for(i=1;i<=n;i++) {for(j=1;j<=n;j++) cout<<c[i][j]; cout<<endl;} getch(); }


				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:12
posted:10/30/2008
language:
pages:1