Advertisement
Guest User

Untitled

a guest
May 4th, 2016
63
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. using namespace std;
  4. int v[105][105];
  5. ifstream f("mincols.in");
  6. ofstream g("mincols.out");
  7. int main()
  8. { int i,j,n, MIN;
  9. f>>n;
  10.  
  11. for(i=1;i<=n;i++)
  12. for(j=1;j<=n;j++)
  13. f>>v[i][j];
  14.  
  15.  
  16.  
  17.  
  18. for(j=1;j<=n;j++)
  19. {
  20. MIN=v[i][j];
  21.  
  22. for(i=1;i<n;i++)
  23. if(MIN>=v[i][j])
  24. MIN=v[i][j];
  25.  
  26. g<<MIN<<" ";
  27.  
  28. }
  29. return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement