title: I can't figure out why command prompt is skipping inputs to a simple C++ program in Visual Studio
body: <p>Here's the program I'm having trouble with, or maybe something is configured wrong in Visual Studio.</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  
  {
  
      //define variables
      int name;
      int income;
      float tax;
  
      //Get the users name
      cou &lt;&lt; "Please enter your full name \n";
      cin &gt;&gt; name;
  
      //Get the users income
      cout &lt;&lt; "Please enter your annual income: \n";
      cin &gt;&gt; income;
  
      //tax conditions
      if (income &lt; 50000)
      {
          cout &lt;&lt; name; cout &lt;&lt; "'s tax rate is 33% and the total income and amount taxed is: \n";
          tax = income * 0.33; 
  
          cout &lt;&lt; income; cout &lt;&lt; "dollars \n";
              cout &lt;&lt; tax; cout &lt;&lt; "dollars \n";
      }
      else
      {
          cout &lt;&lt; name; cout &lt;&lt; "'s tax rate is 38% and the total income and amount taxed is: \n";
          tax = income * 0.38;
  
          cout &lt;&lt; income; cout &lt;&lt; "dollars \n";
          cout &lt;&lt; tax; cout &lt;&lt; "dollars \n";
      }
  system("pause");
  
      return 0;
  
  
  
  
  }
  </code></pre>
  
  <p>It's supposed to calculate the tax on the users income. It does this fine, but as soon as I add the second cin >> name input at the top the command prompt accepts it as an input, then skips the second input and outputs a bunch of random numbers and characters. </p>
  
  <p>This is the output in the command prompt:</p>
  
  <pre><code>Please enter your full name:
  Bob Steve
  Please enter your annual income:
  -858993460's tax rate is 33% and the total income and amount taxed is:
  -858993460dollars
  -2.83468e+08dollars
  Press any key to continue . . .
  </code></pre>
  
  <p>As soon as the first input "Bob Steve" is entered the rest automatically displays. I appreciate any help offered on this problem. </p>