title: I cannot figure out why my file is not writing out
body: <pre><code>#include&lt;iostream&gt;
  #include&lt;fstream&gt;
  using namespace std;
  int main()
  {
  
  ifstream initialCost;
  ofstream output;
  output.open("output.txt");
  initialCost.open("InitialCost.txt");
  float csh1, af1, tr1, csh2, af2, tr2,tcsh1, tcsh2;
  
  initialCost &gt;&gt; csh1 &gt;&gt; af1 &gt;&gt; tr1 &gt;&gt; csh2 &gt;&gt; af2 &gt;&gt; tr2;
  
  tcsh1 =csh1+ (5*(csh1*tr1))+(5*af1);
  tcsh2 =csh2+ (5*(csh2*tr2))+(5*af2);
  
  cout&lt;&lt; "Initial House cost"&lt;&lt; '\t'
      &lt;&lt; "Annual Fuel Cost" &lt;&lt; '\t'
      &lt;&lt; "Tax Rate" &lt;&lt; '\t'
      &lt;&lt; "Total Cost"&lt;&lt; '\n'
      &lt;&lt; csh1 &lt;&lt; '\t' &lt;&lt; af1&lt;&lt; '\t' &lt;&lt; tr1 &lt;&lt; '\t' &lt;&lt; tcsh1 &lt;&lt; '\n'
      &lt;&lt; csh2 &lt;&lt; '\t' &lt;&lt; af2&lt;&lt; '\t' &lt;&lt; tr2 &lt;&lt; '\t' &lt;&lt; tcsh2 &lt;&lt; '\n';
  
  
  
  return 0;
  }
  </code></pre>
  
  <p>My outputs are weird and I can't figure out why my second set of outputs are not working like the first. Also I need my outputs to write into the output file.</p>