title: Strictly Identical arrays input
body: <p>Any general tips to clean up this code?
  just seems that I can accomplish the task w/o doing all the checks..</p>
  
  <p>Thank you!</p>
  
  <p>The txt book problem:
  (strictly identical arrays) Two arrays list1[] and list2[] are strictly identical if they have the same length and list1[] is equal to list2[] for each[i].</p>
  
  <p>write a function that returns true if list1 and list2 are strictly identical using the following header</p>
  
  <pre><code>  bool strictlyEqual(const int list1[], const int list2[], int size)
  </code></pre>
  
  <p>Write a test program that prompts the user to enter two lists of integers and dis­plays whether the two are strictly identical. The sample runs follow. Note that the first number in the input indicates the number of the elements in the list. This number is not part of the list. Assume the list size is maximum </p>
  
  <p>My code:</p>
  
  <pre><code>   #include &lt;iostream&gt;
     using namespace std;
  
     bool strictlyEqual(int const list1[], int const list2[], int size);
  
     bool strictlyEqual (int x1[], int x2[], int n)
     {
       int f=0; int i;
       for (i =1; i&lt;=n; i++)
       {
                 if (x1[i] != x2[])
                 {
                    // breaks loop
                      f=1;
                      break;
                  }
       } 
  
   if (f==0)
   return (true);
   else 
   return(false);
   }
  
  
  int main ()
  cout &lt;&lt; "enter list1: " &lt;&lt; endl;
  int list1[20], i;
  cin &gt;&gt; list1[0];
  for (i=1; i&lt;= list1[0]; i++)
  cin&gt;&gt; list1[i];
  
  cout &lt;&lt;"enter the list2" &lt;&lt; endl;
  int list2[20];
  cin &gt;&gt; list2[0];
  for (i=1; i&lt;= list2[0]; i++)
  cin &gt;&gt; list2[i];
  
  if (list1[0] == list2[0]
  {
       int size = list2[0];
       bool v=strictlyEqual(list1, list2, size);
       if (v== true)
       cout &lt;&lt; "identical" &lt;&lt; endl;
       else 
       cout &lt;&lt; "not identical " &lt;&lt; endl;
   }
  
    return 0;
   }
  </code></pre>