Android 如何在应用程序中以摄氏度显示温度

Android 如何在应用程序中以摄氏度显示温度,android,Android,我在digitalphantom的网站上学习了创建天气应用程序的教程。但问题是我不知道如何将温度转换成摄氏度 代码如下: String YQL = String.format("select * from weather.forecast where woeid in (select woeid from geo.places(1) where text=\"%s\")", location); String endpoint = String.format("http

我在digitalphantom的网站上学习了创建天气应用程序的教程。但问题是我不知道如何将温度转换成摄氏度

代码如下:

String YQL = String.format("select * from weather.forecast where woeid in (select woeid from geo.places(1) where text=\"%s\")", location);

            String endpoint = String.format("https://query.yahooapis.com/v1/public/yql?q=%s&format=json", Uri.encode(YQL));
很抱歉,如果这个问题很模糊或者信息不多,但我仍在学习自己,希望有人能帮我解决这个问题


提前感谢。

将华氏温度转换为摄氏温度的公式如下所示:

C=(F-32)x(5/9)

将摄氏度转换为华氏度的公式如下所示:

F=Cx(9/5)+32


发现

这甚至不是CS问题,是吗?看起来像数学,谷歌快速搜索应该会显示公式。太有趣了。你在问数学公式。增加使用谷歌的习惯,而不是stackoverflow。OP可以自己搜索谷歌。通过回答,你鼓励发布无关的问题。@Stephen Miller:非常感谢你,这正是我想要的!!非常感谢你的帮助!!我想他现在知道了,但作为警察,人们会被吓跑