SHARE
TWEET

kevin

a guest Nov 18th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top