Fahrenheit to celsius || Basic program || C programming
In this, we are going to write a program to convert Fahrenheit to Celsius in C.

#include <stdio.h>
void main()
{
    float celsius,fahrenheit;
 
    // Reads temperature in fahrenheit
    printf("Enter temperature in Fahrenheit: ");
    scanf("%f",&fahrenheit);

    // Fahrenheit to celsius conversion formula                                                         
    celsius=(fahrenheit - 32)*5/9;       
    
    // Print the result                                                           
    printf("Celsius = %.3f",celsius);     //.3f means correct to 3 decimal places
}
//.....Coded by JAIDEEP JAMBLE
#ENJOY CODING

Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post