title: C program that reads in a date and prints out the next day date
body: <p>Hi I have just started learning C language at University. Now I am faced  with a problem I just don't know how to solve. So far we have only used 
   library and nothing else, also scanf is a topic we are going to 
  learn next week. For now we just use printf for everything.
  I have learned how to say if a year is a leap year or not, however, my task is the next one: Need to create a program that reads in a date and prints out the next day date with output like this:</p>
  
  <pre class="lang-none prettyprint-override"><code>Enter a date in the form day month year: 17 5 2010
  The date of the next day is: 18/5/2010
  </code></pre>
  
  <p>My dilemma is that I have no idea on what operations to use or how to set the code to make sure that leap year is considered and for example if today's date is 28 2 2010 the next date needs to be 1 3 2010 because it wasn't leap year.
  The only library used is  and there is no scanf yet (with scanf yet)
  So far I got this:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int day, month, year, ndays, leapdays;
  bool leapyear;
  int main () {
      day = 28;
      month = 2;
      year = 2010;
      ndays = day + 1;
      leapdays = 31;
      leapyear = false;
      if (leapyear % 4 == 0) {
          leapyear = true;
      }
      if (leapyear % 100 == 0) {
          leapyear = false;
      }
      if (leapyear % 400 == 0) {
          leapyear = true;
      }
      if ((leapyear) &amp;&amp; (month == 12 || month == 1 || month == 3 || month == 5 
           || month == 7 || month == 8 || month == 10 )) {
          leapdays = 31;
      }
      if ((leapyear) &amp;&amp; (month == 4 || month == 6 || month == 9 || month == 11 
           )) {
          leapdays = 30;
      }
      if ((leapyear) &amp;&amp; (month == 2 )) {
          leapdays = 29;
      } else if ((leapyear == false) &amp;&amp; (month == 2)) {
          leapdays = 28;
      }
      printf ("Enter a date in the form day month year: %d %d %d \n", day, 
               month, year);
      printf ("The date of the next day is: %d/%d/%d", ndays, month, year);
  }
  </code></pre>