This data type can only hold whole numbers
integer, int
THIS line of code lets you use simplified syntax in C++
using namespace std;
rand()% 10 + 1 generates random integers between one and THIS
10
You can use THIS shortcut to increase the value of a variable by 1
++
(i++, variable++)
THIS is one benefit of using functions
Shorter development time
Simpler iteration and testing of sub-components of code
Less duplication of code
Programming solutions that are easier to maintain
This variable type, used to express True or False, is named after the English mathematician George Boole
Boolean variables
THIS command can be used to get input from the user (also indicate the direction of the carets)
cin >>
In order to get different random numbers, you need to "plant a seed" by using THIS command before calling the rand function
srand(time(0))
Use THIS loop when you know how many times the code should repeat
for loop
THIS kind of function doesn't return anything
VOID
These are letters, symbols, and numbers that will not be used in calculations
characters (also accept string)
THIS command inserts a new line in an output statement
endl (also accept \n)
var = true || false;
THIS is the value of var
TRUE
Use THIS loop when you want the code to run once before checking the condition
do-while loop
Consider the following function header:
int someFunction(char letter, int number)
THIS is the data type of the value returned
int, integer
Allocated memory, value range, and THIS are the differences between float and double data types
precision (number of decimal places)
7 for float, 15 for double
THIS character is used to end statements and appears at the end of (almost) every line
semicolon, ;
THIS operator is used to check if two values are not equal in an if statement
!=
Use THIS loop when you want to check a condition before repeating code
while loop
THIS kind of variable can only be used in the function it is defined in
local variable
This is when you declare a variable and assign an initial value in one line
initializing
Include THIS library in order to format your output statements
<iomanip>
THIS command tells the computer to leave the switch statement at that point
break, break statement
If you want the for loop to run 6 times, what could THIS be:
for (int i = 0; THIS; i++)
i < 6;
i <=5;
THIS is the location of a function prototype or declaration
above the main function/loop