Convert Fahrenheit to Celsius in C++
Advertisements
C++ Program to Convert Fahrenheit to Celsius
Fahrenheit and Celsius are two unit for measure temperature. We have standard formula to Convert Fahrenheit to Celsius, using this formula we can change temperature.
Formula
c = (f - 32) * 5/9;
Convert Fahrenheit to Celsius in C++
#include<iostream.h> #include<conio.h> void main() { float cel, far; clrscr(); cout<<"Enter temp. in Fahrenheit: "; cin>>far; cel = (far - 32) * 5/9; cout<<"Temp. in Celsius: "<<cel; getch(); }
Output
Enter temp. in Fahrenheit: 98 Temp. in Celsius: 36.666668
Google Advertisment