Answer to Question #126343 in C++ for Abdul kadir

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
1
Expert's answer
2020-07-15T09:47:45-0400
#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";
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS