Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem Write a \"C program that will convert temperature from Fahrenheit to Cel

ID: 3940398 • Letter: P

Question

Problem Write a "C program that will convert temperature from Fahrenheit to Celsius and display output on Celsius to Fahrenheit BuEy #include int main (void) ( Hint: Celsius to Fahrenheit Bupay Code is given below. double tempc: /- temperature in Celsius double tempf: /- temperature in Fahrenheit */ printfC Enter value of temp in Celsius: ") scanf("%lf", &tempe;) ; printf("Vnvalue of temp in Celsius : %if ", tempc); tempf tempc * (9.0/5.0) + 32.0; printf ("Temperature in Fahrenheit: %lf ", tempf); return O: /* execution terminates ok /

Explanation / Answer

Whatever you have done is correct only. Please find the code and its output is shown below:

#include <stdio.h>

int main(void) {

   double tempc;   //temperature in celcius
   double tempf;   //temperature in farenheit
  
printf("Enter the value of temperature in farenheit: ");
  
scanf("%lf",&tempf);
  
printf("Value of temperature in farenheit is : %lf ",tempf);
  
tempc = 5.0 * (tempf - 32.0) / 9.0;
  
  
printf("Temperature in celcius : %lf",tempc);
  
return 0;
}

----------------------------------------

OUTPUT:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote