title: How do I find 20 odd numbers starting from a number entered by user?
body: <p>So, i was given an assignment to find 20 odd numbers starting from a number entered by user.. I know how to find odd numbers. but I don't know how to find them starting from a number entered by user. </p>
  
  <p>I tried this:</p>
  
  <pre><code>#include&lt;iostream&gt;
  using namespace std;
  int main(){
      int num,i;
      cout&lt;&lt;"Enter num:   ";
      cin&gt;&gt;num;
      for(i=num;i&lt;=20;i++){
          if(i%2!=0)
          cout&lt;&lt;num &lt;&lt;endl;
      }
  }
  </code></pre>
  
  <p>but it outputs the number entered by user 20 times.</p>