Write a program of c++ to convert fahrenheit to celsius
Answers
Answered by
2
C++ Program to convert fahrenheit to celsius
#include<iostream>
using namespace std;
int main(){
float F,C;
cout<<"Enter the value of temperature in fahrenheit:";
cin>>F;
C = ( F - 32 ) * 5 / 9;
cout<<"Temperature in celsius:"<<C;
return 0;
}
Example Output
Enter the value of temperature in fahrenheit: 97
Temperature in celsius: 36.1111
Códe has been run in VS Códe in the above attachment with output attached.
Attachments:
Similar questions