Question #126343

Q1.To convert temperature in degrees, Fahrenheit to Celcius, one must subtract 32 from the Fahrenheit figure and multiply the result by. 5/9.for example to convert 50°F to Celcius, you proceed as follow (50-32) ×5/9=10°C. Write a C++ program which will ask the user to input five different temperature values in Fahrenheit and output their equivalent in celcius in tabular form with the headings Fahrenheit to Celcius

Expert's answer

#include<bits/stdc++.h>
using namespace std;
int main()
{
int n=5;
while(n--)
{
int c;int f;
cin>>f;
cout<<(f-32)/1.8<<"\n";
}
}
LATEST TUTORIALS
APPROVED BY CLIENTS