title: How to keep asking user to input until condition is satisfied in C?
body: <p>This is small C program and I am trying to validate the user input. I want user to enter 3 values. Condition is that all 3 inputs should not be of same value. So how to loop the user input until condition is satisfied(True). Here is the code. Help me out, I am new to Programming, Thanks. :)</p>
  <pre><code>#include&lt;stdio.h&gt;
  
  int main()
  {
      int u1,u2,u3;
      
      printf(&quot;Enter 3 Numbers : &quot;);  //Printing
      scanf(&quot;%d %d %d&quot;,&amp;u1,&amp;u2,&amp;u3); //Asking for Input
      
      if(u1==u2 || u2==u3 || u3==u1)       //This is the condition
      {
          printf(&quot;Condition is not Satisfied !&quot;);      
      }
  }
  </code></pre>
  <p>So how do I loop it. Thank You.</p>