Programs need a way to store the data they use or create so it can be used later in the program’s execution. Variables and constants offer various ways to represent, store, and manipulate that data.
Today, you will learn
• How to declare and define variables and constants
• How to assign values to variables and manipulate those values
• How to write the value of a variable to the screen
In C++, a variable is a place to store information. A variable is a location in your computer’s memory in which you can store a value and from which you can later retrieve that value.
Notice that variables are used for temporary storage. When you exit a program or turn the computer off, the information ...