title: Division in C++
body: <p>I am new to C++ and I tried this simple code:</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;math.h&gt;
  using namespace std;
  
  int main(){
      double a;
      a=1/6;
      cout&lt;&lt;a;
  }
  </code></pre>
  
  <p>But the result is 0. As I understood, double should work with real numbers, so shouldn't the result be 1/6 or 0.1666666? Thank you!</p>