Write a program in fox pro to print temperature in Fahrenheit
Answers
Answered by
2
PROGRAM IN C (not FOXPRO ) to print temparature in fahrenheit ::::::::::::::::::::::Program to convert temperature from fahrenheit to celsius
/** * C program to convert temperature from degree fahrenheit to celsius */ #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; }
/** * C program to convert temperature from degree fahrenheit to celsius */ #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