Computer Science, asked by sabareswaranrkvlp, 11 months ago

Celsius to Fahrenheit Converter
The relatioship between Celsius (C) and Fahrenheit (F) degrees for measuring temperature is linear. Find an equation relating C and F if 0 C corresponds to 32 F and 100 C corresponds to 212 F.
Write a C program to simulate Celsius to Fahrenheit Converter.
Sample Input and Output:
Temparature in Celsius:
12
Temparature in Fahrenheit is 53.6F​

Answers

Answered by SKAI
2

#include <stdio.h>

int main()

{

   float celsius, fahrenheit;

   /* Input temperature in fahrenheit */

   printf("Enter temperature in Fahrenheit: ");

   scanf("%f", &fahrenheit);

   /* Fahrenheit to celsius conversion formula */

   celsius = (fahrenheit - 32) * 5 / 9;

   /* Print the value of celsius */

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

   return 0;

}

Similar questions