write a program to convert temperature Celsius to Fahrenheit and vice versa

 

  1. #include<stdio.h>
  2.  
  3. main ()
  4. {
  5. float temp_c, temp_f;
  6.  
  7. printf ("Enter the value of Temperature in Celcius: ");
  8.  
  9. scanf ("%f", &temp_c);
  10.  
  11. temp_f = (1.8 * temp_c) + 32;
  12.  
  13. printf ("The value of Temperature in Fahreinheit is: %f", temp_f);
  14.  
  15. }

Comments

Popular posts from this blog

250+ C Programs for Practice

FUNCTION OVERRIDING IN CPP