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