Please Help!!

The program should create two integer variables for the temperature in Celsius and Fahrenheit. Initialize the temperature to 100 degrees Celsius. In a loop, decrement the Celsius value and compute the corresponding temperature in Fahrenheit until the values are the same.
But for some reason i either get no output or an out put of -43.

#include <iostream>
using namespace std;

int main()
{
int celsius;
int fahrenheit;

fahrenheit = 0;
celsius = 100;

while(celsius != fahrenheit)
{
fahrenheit = ((9 * celsius) / 5) + 32;
celsius--;
}

cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(2);

cout << celsius << endl;
cout << fahrenheit;



return 0;

}
Edit
Report
Delete
adjust it as you want,,,

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
 using namespace std; 

 int main()
 {
 float celsius ;
 float fahrenheit;

 cout << "Enter Celsius temp.."<< endl;
 cin >> celsius;

 fahrenheit = celsius * 9.0/5.0+32.0;

 cout << "fahrenheit: " << fahrenheit << endl;
 cout << "celsius:    " << celsius << endl;

 system("pause");
 return 0;
 }
Topic archived. No new replies allowed.