需要帮助将华氏温度转换为摄氏温度 [英] need help converting degrees Fahrenheit to degrees Celsius

查看:112
本文介绍了需要帮助将华氏温度转换为摄氏温度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个作业问题:

我必须编写一个将温度华氏度转换为摄氏度的C程序.此转换的公式为摄氏= 32.0.让程序转换并显示与98.6华氏度相对应的摄氏温度.

this is a homework question:

I have to write a c program that converts temperature degrees Fahrenheit to degrees Celsius. The equation for this conversion is Celsius = 32.0. Have the program convert and display the Celsius temperature corresponding to 98.6 degrees Fahrenheit.

推荐答案

请在此处查找公式,例如:http://www.csgnetwork.com/tempconvjava.html [ ^ ].随时使用Google搜索互联网上其他网站很多的网站.

干杯!

-MRB
Please look up the formulas here for instance: http://www.csgnetwork.com/tempconvjava.html[^]. Feel free to google another site of which there is an abundance out there on the internets.

Cheers!

-MRB


给出您的公式:
Given your formula:
double GetTempCelcius(double TempFahrenheit){return 32.0;}


太简单了!


That was easy!


int main()
{
  double farenheid = 56.3;
  printf("%f", CalcCelcius(farenheid));
  return 0;
}

double CalcCelcius(double Tf)
{
  double Tc = (5/9)*(Tf-32);
  return Tc;
}


这篇关于需要帮助将华氏温度转换为摄氏温度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆