Convert Fahrenheit to Celsius in C++
Here you will get and know the C++ program to convert Fahrenheit to Celsius. To convert Fahrenheit to Celsius formula is given below:
Formula:
C = ( F – 32 ) / 1.8
C++ program to convert Fahrenheit to Celsius
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include<iostream> using namespace std; int main() { float fahrenheit, celsius; // input value in fahrenheit cout<<"Enter the Temperature in Fahrenheit: "; cin>>fahrenheit; // calculation fahrenheit to celsius celsius = (fahrenheit-32)/1.8; // print value in celsius cout<<"\nEquivalent Temperature in Celsius: "<<celsius; return 0; } |
Output
Enter the Temperature in Fahrenheit: 86
Equivalent Temperature in Celsius: 30
Check out our other C++ programming Examples