How would you be able to show both outputs celsius and Fahrenheit and my temperature conversion is coming up wrong when i enter in the input.
here is my code...
#include<iostream>
using namespace std;
int main(){
double celsius;
double fahrenheit;
while(true){
cout << "Please enter in a fahrenheit temperature ";
cin >> fahrenheit;
celsius= fahrenheit * 5/9 - 32;
cout<< "celsius="<< celsius <<endl;
}
system("pause");
return 0;
{
cout << "Please enter in a celsius temperature ";
cin >> celsius;
fahrenheit = celsius * 9/5 + 32;
cout <<"fahrenheit= " << fahrenheit << endl;
}
system("pause");
return 0;
}