title: How to find whether the given array is sorted in descending order in c programming
body: <p>I need to find out whether the given array is sorted in descending order or not...<br>
  I got the output but in portal it shows as Wrong Answer.</p>
  
  <p>This is my code.</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
     int n,a[15],i,k=0;
     scanf("%d",&amp;n);
     for(i=1;i&lt;=n;i++)
     { scanf("%d",&amp;a[i]);}
     for(i=1;i&lt;=n;i++)
     {
        if(a[i]&lt;a[i+1])
           k++;
     }
     if(k==0)
        printf("yes");
     else
         printf("no");
     return 0;
  }
  </code></pre>
  
  <p>Help me to figure it out... </p>