Temperature table using for loop c++
<p>Super new to coding and I've been stuck for awhile on this question. I need to make a program that inputs the temperature in Celsius and an increment that is inputted for a total of 20 lines. In the process it converts to Fahrenheit, Kelvin, and Rankine. That is all fine but I can't get the values to increment by my input.</p>

<p>e.g., As it should look:</p>

<p>Enter temperature in Cel: 50</p>

<p>Enter increment: 5</p>

<pre><code>  Cel   Far   Kel  Rank
</code></pre>

<p>1 - 50   ...............................</p>

<p>2 - 55   ..............................</p>

<p>3 - 60   ..............................</p>

<p>.
.
.
.</p>

<p>20 - 150 .............................</p>

<p>I can't get the values to increment at all. Being reading my notes and looking online to understand the issue but no luck.</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;math.h&gt;
#include &lt;iomanip&gt;

using namespace std;
int main()
{
    int CELS; // celsius entry
    int x; // x = input value for increment
    double FAH = (CELS * (9.0 / 5) + 32); // farenheit conversion
    double KEL = (CELS + 273.15); // kelvin conversion
    double RANK = ((CELS + 273.15) * (9.0 / 5)); // rankine conversion

    cout &lt;&lt; "Enter the temperature in celsius: ";
    cin &gt;&gt; CELS;
    while ((CELS &lt; -273.15) || (CELS &gt; 5000))
    {
        cout &lt;&lt; "ERROR: out of range." &lt;&lt; endl;
        cout &lt;&lt; "Enter the temperature in celsius: ";
        cin &gt;&gt; CELS;
    }
    cout &lt;&lt; "Enter the increment value: ";
    cin &gt;&gt; x;
    cout &lt;&lt; endl;
    cout &lt;&lt; "         #      Cels       Fahr     Kel       Rank" &lt;&lt; endl;

    cout &lt;&lt; right;
    for (int i = 1; i &lt;= 20; i++)
    { //
        for (double j = CELS; j &lt;= CELS; x++)
        { //
            for (double k = (CELS * (9.0 / 5) + 32);
                    k &lt;= (CELS * (9.0 / 5) + 32); x++)
            {
                for (double m = (CELS + 273.15); m &lt;= (CELS + 273.15); x++)
                {
                    for (double n = ((CELS + 273.15) * (9.0 / 5));
                            n &lt;= ((CELS + 273.15) * (9.0 / 5)); x++)
                    {

                        cout &lt;&lt; setw(10) &lt;&lt; i &lt;&lt; setw(10) &lt;&lt; j &lt;&lt; setw(10) &lt;&lt; k
                                &lt;&lt; setw(10) &lt;&lt; m &lt;&lt; setw(10) &lt;&lt; n &lt;&lt; endl;
                    }
                }
            }
        }
    }
}
</code></pre>

<p>And ignore why I have my formulas in the for loop. Formulas were not working using the declared variables so have just done this in the mean time.</p>