满意答案
zpyshow
2014.02.06
采纳率:44% 等级:12
已帮助:7562人
#include
void Temperautre(double Fahrenheit);
int main(void)
{
double Fahrenheit;
printf("Please enter :\n");
while(scanf("%lf",&Fahrenheit)==1){
Temperautre(Fahrenheit);
printf("Please enter another value:");
}
return 0;
}
void Temperautre(double Fahrenheit)
{
const double a=1.8;
const double b=32.0;
const double c=273.16;
const double Celsius = a * Fahrenheit + b;
const double Kelvin = Celsius + c;
printf("%.2f fahrenheit is %.2f celsius or %.2f kelvin\n",Fahrenheit,Celsius,Kelvin);
}
00分享举报