Advertisement
Denistod

Untitled

Nov 16th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int a[30][30];
  4. int main()
  5. {
  6. int m,n,i,j,m1,im1,jm1;
  7. cin>>m>>n;
  8. for(i=1;i<=m;i++)
  9. {
  10. for(j=1;j<=n;j++)
  11. {
  12. cin>>a[i][j];
  13. if(a[i][j]<m1)
  14. {
  15. m1=a[i][j];
  16. im1=i;
  17. jm1=j;
  18. }
  19. }
  20. }
  21. for(i=im1;i<m;i++)
  22. {
  23. for(j=1;j<=n;j++)
  24. {
  25. a[i][j]=a[i+1][j];
  26. }
  27. }
  28. for(i=1;i<m;i++)
  29. {
  30. for(j=1;j<n;j++)
  31. {
  32. cout<<a[i][j]<<" ";
  33. }
  34. cout<<endl;
  35. }
  36. return 0;
  37. }
  38. 92
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement