+ 1
Can someone simply explain variables please?
It's really hard for me to understand how variables work for some reason, what do they actually do, how do they act?
4 Respuestas
+ 3
Simply variables vary in value. The data type appears before the variable name. (int, float, boolen).
Variables are place holders so you can refer to them by a name like x. If i say int x = 5 +5 then you know x = 10.
now i can refer to the variable x and use it to print like
cout << x;
or define another variable y...
int y = x + x;
Variables help keep consepts straight by using clear names as variables. for example.
int apples = 5.
Just remember they are names that hold values that vary.
+ 1
Variables are simply numbers without the numbers. The numbers are blanke you basically have to find out what the numbers are. And u substitute the space with a letter that is equal to the number you dont have.
0
Thanks so much guys u are great
0
variables are those whose value is not constant that means it varies throughout the program.