‘C’ program to accept temperatures in Fahrenheit (F) and print it in Celsius (C) Formula C=5/9(F-32).


C File =>


/* Write a ‘C’ program to accept temperatures in Fahrenheit (F) and  print it in Celsius (C)  Formula C=5/9(F-32) */

#include<stdio.h>
int main() 
{
      float c,f;
      printf("\n Enter temperature in Fahrenheit : ");
 
       scanf("%f",&f);
       c=(5*(f-32))/9;
       printf("\n Temperature in Celcius : %f",c);
 return 0;
}

Comments

Popular posts from this blog

Write a program to allocate memory dynamically for n integers. Accept the elements and calculate their sum and average

C program to accept names of n cities and search for city named “Pune”.