i have just started out learn c++ and have hit a wall can anyone help me please i am using dev-c++ to compile a samll tempreture conversion progam i am getting an error on a couple of line but i dont know what they are can some one let me know whats wrong with them
//
// Program to convert temperature from Celsius degree
// units into Fahrenheit degree units:
// Fahrenheit = Celsius * (212 - 32)/100 + 32
//
include <cstdio>
include <cstdlib>
include <iostream>
using namespace std;
int main(int nNumberofArgs, char* pszArgs[])
{// enter the temperature in Celsius
int celsius;
cout << “Enter the temperature in Celsius:”; I AM GETTING THE ERROR ON THIS LINE
cin >> celsius;
// calculate conversion factor for Celsius
// to Fahrenheit
int factor;
factor = 212 - 32;
// use conversion 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:”; THIS LINE
cout << fahrenheit << endl;
// wait until user is ready before terminating program
// to allow the user to see the program results
system(“PAUSE”); AND THIS LINE
return 0;
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-10-02
That can happen if you use Microsoft Word as your code editor! ;-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
//
// Program to convert temperature from Celsius degree
// units into Fahrenheit degree units:
// Fahrenheit = Celsius * (212 - 32)/100 + 32
//
include <cstdio>
include <cstdlib>
include <iostream>
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 conversion 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 << endl;
// wait until user is ready before terminating program
// to allow the user to see the program results
system("PAUSE");
return 0;
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i have just started out learn c++ and have hit a wall can anyone help me please i am using dev-c++ to compile a samll tempreture conversion progam i am getting an error on a couple of line but i dont know what they are can some one let me know whats wrong with them
//
// Program to convert temperature from Celsius degree
// units into Fahrenheit degree units:
// Fahrenheit = Celsius * (212 - 32)/100 + 32
//
include <cstdio>
include <cstdlib>
include <iostream>
using namespace std;
int main(int nNumberofArgs, char* pszArgs[])
{// enter the temperature in Celsius
int celsius;
cout << “Enter the temperature in Celsius:”; I AM GETTING THE ERROR ON THIS LINE
cin >> celsius;
// calculate conversion factor for Celsius
// to Fahrenheit
int factor;
factor = 212 - 32;
// use conversion 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:”; THIS LINE
cout << fahrenheit << endl;
// wait until user is ready before terminating program
// to allow the user to see the program results
system(“PAUSE”); AND THIS LINE
return 0;
}
That can happen if you use Microsoft Word as your code editor! ;-)
Clifford here taught me to look for that by the way.
Wayne
You are using the wrong quotes - it should look like this "
Wayne
See how this compiles:
//
// Program to convert temperature from Celsius degree
// units into Fahrenheit degree units:
// Fahrenheit = Celsius * (212 - 32)/100 + 32
//
include <cstdio>
include <cstdlib>
include <iostream>
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 conversion 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 << endl;
// wait until user is ready before terminating program
// to allow the user to see the program results
system("PAUSE");
return 0;
}
THANK YOU VERY MUCH