Conversion of temprature by using a function

4/21/2013 04:47:00 pm Unknown 0 Comments



#include <stdio.h>
#include <conio.h>
char conv()
{
      int farh, cels;
      int lower=0, upper=300, step=20;
      farh=lower;
      printf("Fahrenhiet\tCelsius\n");
      while(farh<=upper)
      {
                        cels=5*(farh-32)/9;
                        printf("%d\t\t%d\n", farh, cels);
                        farh=farh+step;                
      }  
}
main()
{
      printf("\"Weather Temperature Conversion Calculator\"\n\n");
      conv();
      getch();
}