title: Beginner C: error: control reaches end of non-void function?
body: <p>I'm trying to make a greedy algorithm and I get this error:</p>
  
  <pre><code>greedy2.c:27:1: error: control reaches end of non-void function
        [-Werror,-Wreturn-type]
  }
  ^
  1 error generated.
  </code></pre>
  
  <p>with this code:</p>
  
  <pre><code>int man(int argc, char* argv[])
  {
  
    float amount;
    do
      {
        printf("Input dollar amount owed:\n");
        amount = GetFloat();
      }
    while (amount &lt;= 0);    
    int coins = 0;
    while (amount &gt;= 0.25);
    {
      amount = amount - 0.25;
      coins++;
    }
    printf("Number of coins to use: %d\n", coins);
  
  }
  </code></pre>
  
  <p>What is wrong with my curly braces, and how do I fix it?</p>