#include <iostream>
using namespace std;
int main()
{ int tempF;
int tempC = 100;
char answer;
do
{
for (tempF = 0; tempF != tempC; tempC--)
{
tempF = (9 * tempC) / 5;
tempF = tempF + 32;
cout << tempF;
cout << endl;
}
cout << endl;
cout << endl;
cout << "Would you like to see the calculation again?\n";
cin >> answer;
} while(answer == 'y' || answer == 'Y');
return 0;
}
Okay, I basically have to make a program that finds the Fahrenheit temp that equals the same in Celsius, so -40. My program stops at -43. We have to use type int and when I changed 32 to 30, it stopped at -40 (but that's not the correct formula. Can anyone see what I did wrong?

New Topic/Question
Reply



MultiQuote



|