Inputs and Integers: C++ Tutorial Two
To continue off of the previous tutorial, this one will briefly explain how to use variables, and how to accept an input.
As you can see above, There are two things that differentiate this code from the previous code:
- “int anExample”: This is using the variable type ‘int’, which means integer. There are several types of variables, but int uses a numerical value (In a set range, which will be covered later) - “cin >> anExample;”: This uses the command ‘cin’ and the operator ‘>>’ to assign a value to the variable ‘anExample’. You can remember cin as ‘c’ and ‘in(put)’ put together.
(EscapeKey(); is a function, and those will be covered later as well.)












