Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4. void citire(int a[10][10],int &n)
  5. {
  6. ifstream in("date.in");
  7. int i,j;
  8. in>>n;
  9. for(i=1; i<=n; i++)
  10. for(j=1; j<=n; j++)
  11. in>>a[i][j];
  12. in.close();
  13.  
  14. }
  15. ofstream out("datee.out");
  16. void afisare(int a[10][10],int &n)
  17. {
  18. int i,j;
  19. for(i=1; i<=n; i++)
  20. {
  21. for(j=1; j<=n; j++)
  22. out<<a[i][j]<<" ";
  23. out<<endl;
  24. }
  25. }
  26. int grad(int x)
  27. {
  28. int j,s=0;
  29. for(j=1;j<=n;j++)
  30. s=s+s[x][j];
  31.  
  32. }
  33. int main()
  34. {
  35. int a[10][10],n,x,j;
  36. citire(a,n);
  37. afisare(a,n);
  38.  
  39. out.close();
  40. return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement