title: Having trouble with school assignment c++ Time Calculator
body: <p>I know there should be something wrong with the calculations that finds how the days, hours, minutes, and seconds are found.</p>
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  int main ();
  
  {
  int inputSeconds = 643600, days, remainingSeconds, hours, minutes, seconds;
  
  days = inputSeconds / 86400;
  remainingSeconds = inputSeconds % 86400;
  hours = remainingSeconds / 3600;
  remainingSeconds = inputSeconds % 3600;
  minutes = remainingSeconds / 60;
  seconds = inputSeconds % 60;
  </code></pre>
  <p>the if\else statements are also giving me trouble, however this might be due to the calculations.</p>
  <pre><code>  if (inputSeconds &gt;= 86400)
  {
    cout &lt;&lt; inputSeconds &lt;&lt; &quot; seconds is &quot;&lt;&lt; days &lt;&lt; &quot; days, &quot; &lt;&lt; hours &lt;&lt; &quot; hours, &quot; 
       &lt;&lt; minutes &lt;&lt; &quot; minutes, and &quot; &lt;&lt; seconds &lt;&lt; &quot; seconds.&quot; &lt;&lt; endl;
  }
    else if (inputSeconds &gt;= 3600)
  {
    cout &lt;&lt; inputSeconds &lt;&lt; &quot; seconds is &quot;&lt;&lt; hours &lt;&lt; &quot; hours, &quot; 
         &lt;&lt; minutes &lt;&lt; &quot; minutes, and &quot; &lt;&lt; seconds &lt;&lt; &quot; seconds.&quot; &lt;&lt; endl;
  }
    else if (inputSeconds &gt;= 60)
  {
    cout &lt;&lt; inputSeconds &lt;&lt; &quot; seconds is &quot;&lt;&lt; seconds &lt;&lt; &quot; seconds.&quot; &lt;&lt; endl;
  }
    else
  {
    cout &lt;&lt; &quot;Invalid entry. Enter a positive number for seconds. Try the program again.&quot; &lt;&lt; 
         endl;
  }
  
  return 0;
  }
  </code></pre>
  <p>When it is given 984561 seconds it gives the right output of</p>
  <pre><code>984561 seconds is 11 days, 9 hours, 29 minutes, and 21 seconds.
  </code></pre>
  <p>but when given 13 seconds the output is wrong and gives</p>
  <pre><code>Invalid entry. Enter a positive number for seconds. Try the program again. 
  </code></pre>
  <p>I'm looking for</p>
  <pre><code>13 seconds is 13 seconds.
  </code></pre>