Skip to content

luc001.c

Problem Statement

Temperature of a city in fahrenheit degrees is input through the keyboard. WAP to convert this temperature into Centigrade degrees.

Metadata

Property Detail
Author Amit Dutta (amitdutta4255@gmail.com)
License MIT

Actions

Raw View on GitHub

💡 You can print or save this file by opening Raw and using your browser.

Source Code

#include<stdio.h>
int main() {
    float f, c;
    printf("Enter the temperature of city in Fahrenheit : ");
    scanf("%f", &f);
    // formula (F - 32) 5/9
    c = ((f - 32) * 5) / 9;
    printf("\nTemperature in centigrade : %f", c);
    return 0;
}