I have hard time with debugging long compile time and multiple user input requirment
<p>I am in need of desperate help because I cannot figure out why and what am I doing wrong. I am trying to ask the user multiple questions about length conversion. I encounter a problem where only the first question is asked, and the next one will not have chance to be asked. I have tried two versions, but they were both flawed.</p>

<p><a href="http://imgur.com/zKqeU08" rel="nofollow">Sample output:</a></p>

<pre><code>Sisestage pikkus meetrides:
500
Sisestage uue uhiku kood (alj, ver, kyn, toll, jalg, jard, lii):
Sisestasite  vale vaartuse:500 void vale uhiku:
</code></pre>

<p>My code:</p>

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

using namespace std;

int main()
{

    float P;              /* Pikkus meetrites  */ /*Length P in metres*/
    string U;             /* M66du:hik*/ /* Unit of measure*/

    float ALJ;  
    float VER; 
    float KYN; 
    float TOLL; 
    float JALG; 
    float JARD; 
    float LII; 

    do
    { 
        cout&lt;&lt;"Sisestage pikkus meetrides: \n";  /*Ku:sin kasutajalt pikkust P*/ /* Asking       user for the length P in metres*/
        cin&gt;&gt;P; 
        if (P &gt; 0)  
            cout&lt;&lt;"Sisestage uue uhiku kood (alj, ver, kyn, toll, jalg, jard, lii): \n"; /* Ku:sin         kasutajalt u:hiku koodi U*/ /* Asking user for the length U in metres*/
        getline(cin, U);
    } while (P &gt; 0);     
    cout &lt;&lt; "Sisestasite  vale vaartuse:"&lt;&lt;P&lt;&lt; endl; /*Veateade*/   
    ALJ = P / 5572;  
    VER = P / 1066.781; 
    KYN = P / 0.53; 
    TOLL = P / 0.0254; 
    JALG = P / 0.3048; 
    JARD = P / 0.9144; 
    LII = P / 500;


    if( U == "alj")
    { 
        cout&lt;&lt; setprecision(2)&lt;&lt;fixed&lt;&lt; P &lt;&lt;"m = "&lt;&lt; ALJ &lt;&lt; U &lt;&lt;"." ;
    } 
    else if( U == "ver")
    {
        cout&lt;&lt; setprecision(2) &lt;&lt; fixed &lt;&lt; P &lt;&lt;" m ="&lt;&lt; VER &lt;&lt; U &lt;&lt;".";
    }
    else if( U == "kyn") 
    {
        cout&lt;&lt; setprecision(2) &lt;&lt; fixed &lt;&lt; P &lt;&lt;" m ="&lt;&lt; KYN &lt;&lt; U &lt;&lt;".";
    } 
    else if( U == "toll") 
    {
        cout&lt;&lt; setprecision(2) &lt;&lt; fixed &lt;&lt; P &lt;&lt;" m ="&lt;&lt; TOLL &lt;&lt; U &lt;&lt;"."; 
    } 
    else if( U == "jalg")
    {
        cout&lt;&lt; setprecision(2) &lt;&lt; fixed &lt;&lt; P&lt;&lt;" m ="&lt;&lt; JALG &lt;&lt; U &lt;&lt;".";
    } 
    else if( U == "jard")
    {
        cout&lt;&lt; setprecision(2) &lt;&lt; fixed &lt;&lt; P &lt;&lt;" m ="&lt;&lt; JARD &lt;&lt; U &lt;&lt;".";
    } 
    else if( U == "lii")
    {
        cout&lt;&lt; setprecision(2) &lt;&lt; fixed &lt;&lt; P &lt;&lt;" m ="&lt;&lt; LII &lt;&lt; U &lt;&lt;".";
    }


    getchar(); 
    getchar();

}
</code></pre>
