Hi, I'm trying to make a program that converts Fahrenheit into Celsius and Kelvin.
#include <iostream>
#include <cmath>
#include <cstdlib>
int main(int argc, char *argv[])
{
double fah, cel, kel;
char ans;
do
{
cout<<"Enter the temperature in Fahrenheit: "; // I get error here..."cout" undeclared
cin>>fah;
cel = (5.0 / 9.0) * (fah - 32.0);
kel = (cel + 273.0);
cout<<"The temperature is "<<cel<<" degree Celsius and "<<kel<<" Kelvin."<<endl;
cout<<endl<<endl
<<"Do you want to do this again? ";
cin>>ans;
fflush(stdin);
}while(ans=='Y' || ans == 'y');
system("PAUSE");
return EXIT_SUCCESS;
}