title: Program is reading far too many decimal cases
body: <p>I'm trying to read 3 floats. I tried to do this with floats and doubles, but I get the same behavior with both.</p>
  
  <p>Input example:</p>
  
  <pre><code>3 1 2
  32.0 54.7 -2
  </code></pre>
  
  <p>3 integers on first line, 3 floats on second line:</p>
  
  <p>How I'm reading:</p>
  
  <pre><code>vector&lt;int&gt; order;
  vector&lt;double&gt; numbers;
  unsigned int order_number;
  double number;
  char input_character;
  
  while (true)
  {
    scanf("%d", &amp;order_number);
    order.push_back(order_number);
  
    scanf("%c", &amp;input_character);
  
    if (input_character == ' ')
      continue;
    else
      break;
  }
  
  while (true)
  {
    scanf("%lf", &amp;number);
    numbers.push_back(number);
  
    scanf("%c", &amp;input_character);
  
    if (input_character == ' ')
      continue;
    else
      break;
  }
  
  printf("%d %d %d\n", order[0], order[1], order[2]);
  printf("%lf %lf %lf\n", numbers[0], numbers[1], numbers[2]);
  </code></pre>
  
  <p>When printing them, I get:</p>
  
  <pre><code>32.000000 54.700000 -2.000000
  </code></pre>
  
  <p>I wanted just <code>32.0</code>, <code>54.7</code>  and <code>-2</code>. I know I can specify how many decimal places to print with <code>%.x</code>, but I need to print as many as were given to me in the input.</p>
  
  <p>Also, those <code>while (true)</code> loops are there because I don't know how many numbers I'm going to get.</p>