1/9
Set one
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Declare an identifier capable of holding a whole number
int number;
Declare an identifier capable of holding a series of letters
#include <string>
string text;
Declare an identifier capable of holding the value Pi
const double PI = 3.14159;
Declare an array variable capable of holding prices of items in a store
double prices[100];List operators in order of precedence, including rational operators and logical operators
Parentheses (highest), Unary, multiplication, additive, Relational, Equality, Logical AND (&&) ( , Logigcal OR ( | | ), Assignment (=,+=)
For loop, iterate 109 times (start doesn’t matter):
for (int i = 0; i < 109; ++i)
100 iterations, even values starting from 0:
for (int i = 0; i < 200; i += 2)Sentinel-controlled while loop until -1:
int val;
while (cin >> val && val != -1)While loop: read file until EOF and count items:
ifstream in("in.dat");
int x, count = 0;
while (in >> x) { ++count; }Do-while input validation (0–100 inclusive):
int num;
do {
cout << "Enter 0–100: ";
cin >> num;
} while (num < 0 || num > 100);