Fah Celsius

C++ problem i need help debugging?

this is my program it builds fine but it wont run

#include
using namespace std;
int main()
{
int fah, cel;

for (cel = 100; cel != fah; cel–)

fah = ((9*cel)/5+32);

cout << "celsius and fahrenheit are the same atn";
cout << fah << " " << cel << endl;

return 0;
}

include
using namespace std;
int main()
{
int fah, cel;

fah=0;

for (cel = 100; cel != fah; cel–)

fah = (9*cel)/5+32; // ((9*cel)/5)+32 or (9*cel)/(5+32)

cout << "celsius and fahrenheit are the same atn";
cout << fah << " " << cel << endl;

return 0;
}

be success.

CONVERSIÓN DE GRADOS CELSIUS A GRADOS FAHRENHEIT


Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!