Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. void citire(int A[10][10],int n)
  4. {int i,j;
  5. for (i=1;i<=n;i++)
  6. for (j=1;j<=n;j++)
  7. {cout<<"A=["<<i<<"]["<<j<<"]=";cin>>A[i][j];}
  8. }
  9. void afisare_matrice(int A[10][10],int n)
  10. {int i,j;
  11. for (i=1;i<=n;i++)
  12. {for(j=1;j<=n;j++)
  13. cout<<A[i][j];
  14. cout<<endl;}
  15. }
  16. int main()
  17. {int A[10][10],n;
  18. cout<<"n=";cin>>n;
  19. citire(A,n);
  20. cout<<"Matricea este";
  21. cout<<endl;
  22. afisare_matrice(A,n);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement