title: C - Read in float value using getchar and print out float using printf
body: <p>I'm extremely lost and confused. </p>
  
  <p>I have to read in a float integer like 3.432 using getchar. Then, I have to print it out again as a float with a precision of 4 decimal places using printf. So 3.432 --> 3.4320 and .450 --> .4500, and 453 --> 453.0000. </p>
  
  <p>I've been using getchar() and I understand that, but trying to reconvert the value as a float is where I'm just extremely lost. </p>
  
  <pre><code> float num = 0.0;
   char ch;
   while((ch = getchar()) != '\n'){
        num = ch - '0';
        printf("%.4f", num);
   }
  </code></pre>
  
  <p>I know why that is wrong and what it outputs but that's what I have so far </p>
  
  <p>EDIT: I can only use getchar to read the float values</p>