Advertisement
Guest User

kevin

a guest
Nov 18th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void cit3(int &n, int &m, int a[10][10])
  6. {
  7. int i,j;
  8. cout<<"n=";
  9. cin>>n;
  10. cout<<"m=";
  11. cin>>m;
  12. for (i=1;i<=n;i++)
  13. for (j=1;j<=m;j++)
  14. cin>>a[i][j];
  15. }
  16. int coloana3(int n, int m, int a[10][10], int x)
  17. {
  18. int i;
  19. for (i=1;i<=n-1;i++)
  20. if (a[i][x]!=a[i+1][x])
  21. return 0;
  22. return 1;
  23. }
  24. void indice3(int n, int m, int a[10][10])
  25. {
  26. int j;
  27. for (j=1;j<=m;j++)
  28. if (coloana3(n,m,a,j)==1)
  29. cout<<j<<" ";
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement