Unable to properly do a While Loop : <p>I am trying to do a while loop. I have been trying for a long time, but still cannot figure this out. </p>

<pre><code>#include &lt;iostream&gt;
#include &lt;iomanip&gt;
#include &lt;cmath&gt;
using namespace std;

int main()
{
char input;
double voltage, current;

while ((input = 'Y'))
{
    cout &lt;&lt; "Enter the voltage: ";
    cin &gt;&gt; voltage;
    cout &lt;&lt; "Enter the current: ";
    cin &gt;&gt; current;

    cout &lt;&lt; "The resistance is " &lt;&lt; voltage/current &lt;&lt; endl;

    cout &lt;&lt; "Do you wish to continue? [Y/N]";
    cin &gt;&gt; input;
}
}
</code></pre>

<p>Entering other variables other than 'Y' still causes the code to loop. Doing //while ((input == 'Y')) does not give me an output</p>
