//
// Program to convert temp from celsius degree
// units into fahrenheit degree units:
// fahrenheit - celsius * (212 - 32)/100 + 32
//
#include
#include
#include
using namespace std:
int main(int nNumberofArgs, char* pszArgs[]_
{
//enter the temperature in celsius
int celsius;
cout << "Enter the temperature in Celsius:";
cin >> celsius;
//calculate conversion factor for celsius
//to fahrenheit
int factor;
factor = 212 - 32;
//use converstion factor to convert celsius
// into fahrenheit values
int fahrenheit;
fahrenheit = factor * celsius/100 + 32;
// output the results (followed by a newline)
cout << "fahrenheit value is:";
cout << fahrenheit << end1;
//wait until user is ready before terminating program
// to allow the user to see the program results
system("PAUSE");
return 0;
}
^^^^
That's my code. Here is the error message;
http://img513.imageshack.us/img513/4844/cplus.jpg
Can anyone tell me what's wrong?
many thanks
//
// Program to convert temp from celsius degree
// units into fahrenheit degree units:
// fahrenheit - celsius * (212 - 32)/100 + 32
//
#include
#include
#include
using namespace std:
int main(int nNumberofArgs, char* pszArgs[]_
{
//enter the temperature in celsius
int celsius;
cout << "Enter the temperature in Celsius:";
cin >> celsius;
//calculate conversion factor for celsius
//to fahrenheit
int factor;
factor = 212 - 32;
//use converstion factor to convert celsius
// into fahrenheit values
int fahrenheit;
fahrenheit = factor * celsius/100 + 32;
// output the results (followed by a newline)
cout << "fahrenheit value is:";
cout << fahrenheit << end1;
//wait until user is ready before terminating program
// to allow the user to see the program results
system("PAUSE");
return 0;
}
^^^^
That's my code. Here is the error message;
http://img513.imageshack.us/img513/4844/cplus.jpg
Can anyone tell me what's wrong?
many thanks
Change:
using namespace std:
to:
using namespace std;
I have not verified that the rest of your code is correct. But that line is causing your error.
Change:
using namespace std:
to:
using namespace std;
I have not verified that the rest of your code is correct. But that line is causing your error.
thanks, i changed that now and went over my other errors;
End1 should have been endl
and pszArgs[]_ should have ended with )
works fine now
thanks