A program generally consists of two parts, variables and control statements . A variable is a named piece of memory that can be used to store some data. This data can be input by the user of the program or it can be computed using other pieces of data. In most languages, we can also specify the type of the variable, which restricts the type of data that can be stored in the variable. Some common types include integer, floating point, character, and string.
Control statements tell the computer what to do with the data.
Assignment statements are used to store data into a variable. The expression can be anything that computes a value, then the value is stored into the variable. Input statements are used to ask the user to give the program a value. Usually, this is from the keyboard. Output statements are used to display results of a computation.