title: Why isn't "Return" necessary?
body: <p>The following code is for the lab <a href="https://cs50.harvard.edu/x/2021/labs/1/population/" rel="nofollow noreferrer">https://cs50.harvard.edu/x/2021/labs/1/population/</a>.</p>
  <pre><code>#include &lt;cs50.h&gt;
  #include &lt;stdio.h&gt;
  
  int main(void)
  {
      //Prompt for start size
      int startPop;
      do
      {
          startPop = get_int(&quot;Starting population: &quot;);
      }
      while (startPop &lt; 9);
      
      //Prompt for end size
      int endPop;
      do
      {
          endPop = get_int(&quot;Ending population: &quot;);
      }
      while (endPop &lt; startPop);
      
      int Years = 0;
      
      while (startPop &lt; endPop)
      {
          startPop = startPop + (startPop/3) - (startPop/4);
          Years++;
      }
     
      printf(&quot;Total Years: %i&quot;, Years);
      
  }
  </code></pre>
  <p>Why isn't return used after each integer is received? Like this</p>
  <pre><code>  int startPop;
      do
      {
          startPop = get_int(&quot;Starting population: &quot;);
      }
      while (startPop &lt; 9);
      return startPop;
  </code></pre>
  <p>How do I know when and where to use it? What is the purpose of return?</p>
  <p>It seems like every time I try to solve a problem I am completely off base and don't even know where/how to begin, even after hours of thinking about it and then the solution also mystifies me.</p>