This question requires writing a program to calculate the Celsius temperature corresponding to a Fahrenheit temperature of 100°F. Calculation formula: C=5×(F−32)/9 , where: C represents temperature in Celsius, F represents temperature in Fahrenheit, and the output data is required to be an integer.
Input format:
This question has not been entered.
Output format:
Output in the following format
fahr = 100, celsius = 计算所得摄氏温度的整数值
Code:
# include <stdio.h>
# include <stdlib.h>
int main(){
int fahr = 100,celsius;
celsius = 5 * (fahr - 32) / 9;
printf("fahr = %d, celsius = %d",fahr,celsius);
return 0;
}