Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Program to calculate Fahrenheit and Celsius

Posted By: Olive Vasquez     Category: C Programming     Views: 5694

Program to calculate Fahrenheit and Celsius

Code for Program to calculate Fahrenheit and Celsius in C Programming

#define F_LOW 0
#define F_MAX 250
#define STEP 25

void main()
{
    typedef float REAL;
    REAL fahrenheit,celsius;
    clrscr();

    fahrenheit = F_LOW;
    printf("Fahrenheit      Celsius\n\n");
    while(fahrenheit <= F_MAX)
    {
        celsius = (fahrenheit-32.0)/1.8;
        printf("%5.1f           %7.2f\n",fahrenheit,celsius);
        fahrenheit = fahrenheit + STEP;
    }
    getch();
}
  
Share: 


Didn't find what you were looking for? Find more on Program to calculate Fahrenheit and Celsius Or get search suggestion and latest updates.

Olive Vasquez
Olive Vasquez author of Program to calculate Fahrenheit and Celsius is from Chicago, United States.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!