Ask your own question, for FREE!
Computer Science 15 Online
Ballery1:

literally can't make this program run on code blocks. help plz

Ballery1:

``` // // Conversion - Program to convert temperature from // Celsius degrees into Fahrenheit: // Farhrenheit = Celsius * (212 - 32)/100 + 32 // // #include <cstdio> #include <cstdlib> #include <iostream> using namespace std; int main(int nNumberofArgs, chars* pszArgs[]) { // enter the temperature in Celcius int celsius; cout << "Enter the temperature in Celcius:"; cin >> celcius; // calculate conversion factor for Celsius //to Fahrenheit int factor; factor = 212 - 32; //use conversion factor to convert Celsius //into Fahrenheit values int factor; 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 pragram results cout << "Press Enter to continue..." <<endl; cin.ignore(10, '\n'); cin.get(); return 0; } ```

Ballery1:

https://onlinegdb.com/HJpc2JhlU

Ballery1:

line 18 now

Ballery1:

it says "Celsius was not declared in this scope." what does that mean?

Ballery1:

nvm i got it fixed. just a bunch of misspelling and stuff.

Razor:

Oof...

Ultrilliam:

Yea, lotta mispelling, didn't realize this was already solved and just fixed it lol ```cpp // // Conversion - Program to convert temperature from // Celsius degrees into Fahrenheit: // Farhrenheit = Celsius * (212 - 32)/100 + 32 // // #include <cstdio> #include <cstdlib> #include <iostream> using namespace std; int main(int nNumberofArgs, char* pszArgs[]) { //declare variables int fahrenheit; int celsius; int factor; //enter the temperature in Celcius cout << "Enter the temperature in Celcius:"; cin >> celsius; //calculate conversion factor for Celsius //to Fahrenheit factor = 212 - 32; //use conversion factor to convert Celsius //into Fahrenheit values 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 pragram results cout << "Press Enter to continue..." <<endl; cin.ignore(10, '\n'); cin.get(); return 0; } ```

Ultrilliam:

dumb question, why was this in writing, LOL

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!