Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int i,j;
  9. int i_max = 3;
  10. int j_max = 3;
  11. double matrix [i_max] [j_max];
  12. ifstream Matrix("matrix.txt");
  13.  
  14. for(i = 0; i < i_max; i++) {
  15.  
  16. for(j = 0; j < j_max; j++) {
  17.  
  18. Matrix >> matrix [i][j];
  19. cout << matrix [i][j] << " ";
  20.  
  21. }
  22. cout << endl;
  23.  
  24. }
  25. Matrix.close();
  26. return false;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement