title: Printing a calendar month
body: <p>Implement a function that prints the calendar for a given month and year. First, prompt the user:</p>
  
  <pre><code>Enter the month and year:
  </code></pre>
  
  <p>Once the user enters a valid input (two integers separated by a space), print out the calendar in a format be similar to the output of the UNIX <code>cal</code> command. For example, if the user enters <code>03 2014</code>, the output should be:</p>
  
  <p><img src="https://i.stack.imgur.com/gFQr3.png" alt=""></p>
  
  <p>I need help with being able to ask the user for the specific input that this question is asking for. I am also having trouble with creating code that will be able to print different months based on the input, as each month starts on a different day. I cannot use anything too complex as I'm taking a beginner course in programming.</p>
  
  <p>The code I have so far for only printing out March:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      int k, rmd;
  
      printf("     March 2014\n");
      printf(" Su Mo Tu We Th Fr Sa\n");
  
      for(k = 1; k &lt; 32; ++k) {
           if(k == 1){
               printf("                   %2d\n", k); 
           }
           else if(k % 7 == 1) {
               printf(" %2d\n", k);
           }
           else {
               printf(" %2d", k);
           }
      }
      return 0;
  }
  </code></pre>