- 1
what is variables
4 Réponses
+ 4
A variable is like a box.
You create a box with a name.
int x; // Empty variable, Empty box.
int y = 5; // Here we put 5 into this variable or box.
Console.Write(y); // Here we open the box and use what we put inside it. So the output will be 5.
// With our empty box x, we can put values inside of it.
x = 10; // Here we open our box and puts 10 inside it.
It's the same thing with all variable types.
+ 3
A variable holds a value that you can change.
- 2
ok
- 2
very nice