Need help with this c++ source code! DOnt understand what some stuff mean.

Okay so I am just starting programming c++. I just started started to red "C++ for Dummies yesterday and theres a lot of things I do not understand from this book and this source code especially. I will first post the full source code and then post questions about certain thing, usually what they do and how they help. Anyways here it is! (I understand there are comments yet I still don't understand some stuff :wall:, sorry)

 
//
// 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;
}

Okay so these are the things I do not undersand. In these lines, i understand it declares a variable and names it "factor" but I dont understand why on the next line it says "factor = 212 - 32;" what does the equals sign mean and what do the integers 212 and 32 do? also what the minus sign do. I think this is an expression but i dont understand it. Do I need it? Please help! Explain it in non geeky please guys! I am pretty newbie. Here is the source code:

 int factor;
factor = 212 - 32;

Next would be this expression and how it works. Is this the formula to convert Celsius to Fahrenheit? Please explain everything and what ALL things do. equals sign, etc. Non geeky please I am pretty newbie right now.

fahrenheit = factor * celsius/100 + 32;

Well that's it for now! I hope you wizards answer this soon. I will continue to read and continue to stumble countless times. Anyways guys have a good day! :slight_smile:

Is this homework??? I'd understand if you have questions about the syntax, but about basic mathematical expressions???

I wouldn't even know how to explain this "geeky" (as you put it). Those are mathematical expressions / formulas. The minus sign is an operator, just as in mathematics, and does the same thing as it does there: substract 2 numbers.

I'am currently reading c++ for Dummies and it gave me this source code for the calculator. Anyways I wanted to know what this meant:

factor = 212 - 32;

Why are their the integers 212 and 32? What is an operator, more what does it do?

Next would be this one I believe it is the expression to calculate the conversion?

fahrenheit = factor * celsius/100 + 32;

Does the 32 here connect with the 32 on the other line? What about the "100"?

Anyways my real question is on the first one. Anyways hope you guys can help!

---------- Post updated at 01:00 PM ---------- Previous update was at 12:58 PM ----------

Ohhhhh thank you