title: How to use float and double and integer for accurate temperature conversion?
body: <p>Please help. I am new to programming. I am focusing on functions now. Basically the function 'sort of' works. However the temperature converted to fahrenheit from celcius is not accurate.Any explanation on why the answers start ok and get more and more wrong would be super helpful. Thanks. Here is the code below:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;conio.h&gt;
  
  //function prototypes
  float convertTofahrenheit(float z);
  
  int main (void){
      float x,y;
      int count_c;
      x=convertTofahrenheit(y);
  
      printf ("%s\t%s","Celcius","Fahrenheit\n");
      for (count_c=0;count_c&lt;=30;count_c++){
          x++;
          printf ("%d\t%f\n", count_c, x);
      }
  
      getch();
      return 0;
  }
  
  //function for conversion from Celcius to Fahrenheit
  float convertTofahrenheit(float z){
      float fahrenheit;
      fahrenheit= ((z*1.8)+32);
      return fahrenheit;
  }
  </code></pre>