title: Compare 3 arrays c++ [like graph]
body: <p>can any one help me about this</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;stdio.h&gt;
  
  using namespace std;
  int main () {
  
  
  
  int A[100] , B[100] , C[100];
  
  int i=0 ,j=0, h=0;
  
  int connctive=0 ;
  
  cout &lt;&lt; "THE PROGRAM TAKE 3 GRAGHS ONLY\n";
  
  
  cout &lt;&lt; "\n enter the Graph 1 \n";
  cin &gt;&gt; A[i];
  
  cout &lt;&lt; "\n enter the Graph 2 \n";
  
  cin &gt;&gt; B[j];
  
  cout &lt;&lt; "\n enter the Graph 3 \n";
  cin &gt;&gt; C[h];
  
  for(i=0;i&lt;=100;i++ ){
  
  for (j=0;j&lt;=100;j++){
  
          for(h=0;h&lt;=100;h++){
  
              if (A[i]==B[j]) {
                  connctive = connctive +1;}
  
              if (A[i]==C[h]){
                  connctive = connctive +1;}
  
              if (B[j]==C[h]){
                  connctive = connctive +1;
              } else
         { if (A[i]!=B[j]!=C[h])
             cout &lt;&lt; "non of graphs is connective" &lt;&lt;endl;}}}
  }
  
  
  
  
  cout &lt;&lt; connctive &lt;&lt;"connctive " &lt;&lt;endl;
  
  
  
  return 0;
  
  }
  </code></pre>
  
  <p>i'm working to solve this program i want to Compare 3 arrays and print out the Union numbers with name connective or not Can someone please explain to me why the output from the following code is saying that arrays are not connective all the time :( ?? even when i entered different numbers</p>