title: C# print every third number!
body: <p>Help needed to perform an output in C# console application.</p>
  
  <p>I have a maximum number</p>
  
  <pre><code>int maxNr = 10;
  int myValue = 1;
  
  public void myMethod(){
  int choice = int.Parse(Console.ReadLine());  // only 1 or 2 accepted.
  
  //Only choice = 1 in displayed here.
  if(choice == 1){
     while(myValue &lt;= maxNr){
       Console.WriteLine(myValue);
       myValue = myValue + 3;
     }
  }
  }
  </code></pre>
  
  <p>Expected output:
  1, 4, 7, 10
  Next time the function is called the output should be:
  3, 6, 9
  2, 5, 8</p>