Computer Languages
|
|
Variables store data for the program to work with. A variable is a name that represents a piece of data with many possible values; it can be used in the entire program (Global variable) or just in one part (Local variable). |
|||||||||||||
|
For example, if a program has a variable called 'aboveNinety' which is to be used as a counter to evaluate a student's overall performance in examinations, while the variables 'FrenchScore', 'RussianScore' and 'SpanishScore' represent the values of their results in the individual examinations, then the program might read as follows.
|
|||||||||||||