title: Getting output for inches
body: <p>Below is a code I wrote to convert user input of inches to miles, yards, feet. My only issue is that the format in which I would like this to be output would require the output to have "0 inches" as well.</p>
  
  <p>For the life of me I cannot figure that much out. I tried setting a new int value to inches and have it return 0, but that just confused things even more.</p>
  
  <p>Thanks for any help.</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int
  main ()
  {
  
  
    double m;
    double y;
    double f;
    double i;
  
    cout &lt;&lt; " Enter the Length in inches:";
    cin &gt;&gt; i;
  
    m = i / 63360;        // Convert To Miles
    y = 1760 * m;         // Convert To Yards
    f = 3 * y;            // Convert to Feet
    i = 12 * f;           // Convert to Inches
  
    cout &lt;&lt; i &lt;&lt; "inches =" &lt;&lt; " " &lt;&lt; m &lt;&lt; " " &lt;&lt; "(mile)s," &lt;&lt; " " &lt;&lt;
    y &lt;&lt; " " &lt;&lt; "yards," &lt;&lt; " " &lt;&lt; f &lt;&lt; " " &lt;&lt; "feet," &lt;&lt; " " &lt;&lt; i &lt;&lt;
      " " &lt;&lt; "inches." &lt;&lt; endl;
  
  
  
    return 0;
  </code></pre>