title: Can you use a for loop inside the condition of an if-else statement?
body: <p>Can you use a for loop inside the condition of an <code>if-else</code> statement? For example, something like this...</p>
  
  <pre><code>if(
          for(q = 0; q &lt; 10; q++){
              values[q]&gt;=values[q+1];
          }          
              )
  
              {
  
           done = 0;
      }
  </code></pre>
  
  <p>This is loading an error I can't seem to place. I want the if statement to check to see if the <code>int[]</code> I called <code>values</code> is in order from greatest to least, and if it is, set <code>int</code> variable <code>done</code> equal to 0. </p>
  
  <p>I only just started taking a programming class and I bet this is a very dumb mistake, but I've been trying to figure this out for a while and some help would be absolutely fantastic.</p>