Skip to main content
SEE CS 2083 LEARN • PRACTICE • SUCCEED 🔍

Saturday, March 6, 2021

📚 SEE COMPUTER SCIENCE • CDC 2083

C program to get temperature in fahrenheit from the user and then print the temperature in celcius.

📅 Updated learning resource Quick read 📱 Mobile friendly

 

1.     Write a C program to get temperature in fahrenheit from the user and then print the temperature in celcius.

 

#include <stdio.h>

#include<conio.h>

int main()

{

    float c, f;

    printf("Enter temperature in Fahrenheit: ");

    scanf("%f", &f);

    c = (f - 32) * 5 / 9;

    printf("%.2f Fahrenheit = %.2f Celsius", f, c);

    return 0;

}

1 comment:

Home 📖Chapters 🎯Quiz MCQs 🔍Search