Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ifstream in("MATRICE.IN");
- ofstream out("MATRICE.OUT");
- void matrice (int a[20][20],int n)
- {
- int i,j;
- for (i=1;i<=n;i++)
- for (j=1;j<=n;j++)
- in>>a[i][j];
- for (i=1;i<=n;i++)
- {
- for (j=1;j<=n;j++)
- cout<<a[i][j]<<" ";
- cout<<endl;
- }
- }
- void liniax (int a[20][20],int n)
- {
- int i,j,x;
- cin>>x;
- for (j=1;j<=n;j++)
- cout<<a[x][j]<<" ";
- cout<<endl;
- }
- void vector (int a[20][20],int n)
- {
- int i,j,v[20],c;
- cin>>c;
- for (i=1;i<=n;i++)
- {
- v[i]=a[i][c];
- out<<v[j]<<" ";
- }
- }
- void cmmmc (int a[20][20],int n)
- {
- int cmmmc,i,j,d[20][20];
- for (j=1;j<=n;j++)
- for (i=1;i<=n;i++)
- d[i][j]=a[i][j];
- }
- int main ()
- {
- int a[20][20],n;
- in>>n;
- matrice (a,n);
- liniax (a,n);
- vector (a,n);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement