title: Is it possible to create a program that accepts 3 integers and outputs the odd/even integers without using array?
body: <p>Our teacher gave us an exercise in C. We have to create a program that accepts three integers and outputs them if they are odd or even without using arrays, only loops and conditional statements can be used.
  What I am only allowed to use are scanf(), printf(), loops and conditional statements. I must not have multiple variables like odd1, odd2, odd3, even1, even2, even3.And I must not do scanf("%d %d %d",), so I must run scanf("%d") three times in a loop.I couldn't think of any idea that would precisely print the same format of the expected output. I hope someone could help me on this</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main() {
  
      int i, num;
  
      printf("Enter three integers: ");
  
      for(i=1;i&lt;=3;i++)
      {
          scanf("%d", &amp;num);
  
            if(!(num%2))
            {
              printf("\nEven: %d", num);    
            }
            if(num%2)
            {
              printf("\nOdd: %d\n", num);    
            }
      }
  }
  </code></pre>
  
  <p>I expect the following like this...</p>
  
  <p>Input: </p>
  
  <pre><code>   1 2 3
  </code></pre>
  
  <p>Output: </p>
  
  <pre><code>   Odd: 1 3
     Even: 2
  </code></pre>
  
  <p>Input: </p>
  
  <pre><code>   2 4 6
  </code></pre>
  
  <p>Output: </p>
  
  <pre><code>   Odd:  
     Even: 2 4 6
  </code></pre>
  
  <p>...but the only thing i can do is this</p>
  
  <p>Input: </p>
  
  <pre><code>   1 2 3
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>    Odd: 1
     Even: 2
      Odd: 3
  </code></pre>
  
  <p>Input: </p>
  
  <pre><code>    1 3 5
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>    Odd: 1
      Odd: 3
      Odd: 5
  </code></pre>