title: Why is the *= operator not functioning the way I would expect it to?
body: <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main ()
  {
      //If a triangle has a perimeter of 9 units, how many iterations(each iteration is 4/3 as much) would it take to obtain a perimeter of 100 units? (or as close to 100 as you can get?)
      double p = 9; int it = 0;
      for(p; p &lt; 100; p = p * 4/3){
          cout &lt;&lt; p &lt;&lt; endl;
          it++;
      }
      cout &lt;&lt; p &lt;&lt; endl;
      cout &lt;&lt; it &lt;&lt; endl;
      system ("PAUSE");
      return 0;
  }
  </code></pre>
  
  <p>So for a math project I was doing, I had to figure out how many iterations it would take for a perimeter of 9 to reach 100 if you increase the perimeter 4/3x as much during each iteration. When I write the code like I do above, the output is fine, however if I change </p>
  
  <pre><code>for(p; p &lt; 100; p = p * 4/3)
  </code></pre>
  
  <p>to</p>
  
  <pre><code>for(p; p &lt; 100; p *= 4/3)
  </code></pre>
  
  <p>I get output that doesn't make sense. Am I misunderstanding the *= operator? Do I need parentheses somewhere?</p>