Variables - Quote :
Full program
_______________________
#include
int main()
{
using namespace std;
int var1;
var1 = 13823687;
cout << var1 << endl;
system("pause");
return 0;
}
Okay so there are only a few new lines in this program in comparison with the last one.
- Quote :
int var1;
The int part of this line stands for integer (whole number) and that is the type of variable we are going to use. The var1 is just the name of the variable and we can change this to anything we want.
- Quote :
var1 = 13823687;
This line is very simple and im sure you can work out for youself what it will do. You are declaring which variable you want to assign the value to then actually giving it a value