title: Floating point error in C++ code
body: <p>I am trying to solve a question in which i need to find out the number of possible ways to make a team of two members.(note: a team can have at most two person)
  After making this code, It works properly but in some test cases it shows floating point error ad i can't find out what it is exactly.</p>
  
  <p>Input: 1st line : Number of test cases
         2nd line: number of total person</p>
  
  <p>Thank you</p>
  
  <pre><code>#include&lt;iostream&gt;
  using namespace std;
  long C(long n, long r)
  {
      long f[n + 1];
      f[0] = 1;
      for (long i = 1; i &lt;= n; i++)
      {
          f[i] = i * f[i - 1];
      }
      return f[n] / f[r] / f[n - r];
  }
  
  int main()
  {
      long n, r, m,t;
      cin&gt;&gt;t;
      while(t--)
      { 
          cin&gt;&gt;n;
          r=1;
          cout&lt;&lt;C(n, min(r, n - r))+1&lt;&lt;endl;
      }
      return 0;
  }
  </code></pre>