C++ 程序将华氏转换成摄氏度
在这个程序中,我们将了解如何使用 C++ 将摄氏度转换成华氏度。我们知道公式很简单。

算法
Begin Take the Celsius temperature in C calculate F = (9C/5)+32 return F End
代码示例
#include<iostream>
using namespace std;
main() {
float f, c;
cout << "Enter temperature in Celsius: ";
cin >> c;
f = (9.0*c/5.0)+32;
cout << "Equivalent Fahrenheit temperature is: " << f;
}输出
Enter temperature in Celsius: 37 Equivalent Fahrenheit temperature is: 98.6
广告
数据结构
网络
关系数据库管理系统 (RDBMS)
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP