You made it to the end of the lesson! High five. 🙌
Here is a review of the lesson:
- A variable represents a particular piece of your computer’s memory that has been set aside for you to use to store, retrieve, and manipulate data.
- C++ basic data types include:
double: floating-point numbers
char: individual characters
string: sequence of characters
- Single equal sign
=indicates assignment, not equality in the mathematical sense.
cinis how to receive input from the user.
Use the open space in review.cpp to practice what you learned about variables. Here are some ideas:
- Create a program that takes in the weight of an item and then calculates how much that item would weigh on Mars.
- Create a program that asks for a distance in miles as input. The program will then output how much that distance is in kilometers.
(You can also just run the code as is to move on.)