terminalLesson 1 · 12 min read
Your first steps in programming
Introduction
Explain what an algorithm and a C++ program do, then trace a simple program.
Sign in to open lesson →
terminalLesson 2 · 8 min read
Your first C++ program
Program structure & output
Recognize the parts of a C++ program and print a message on a new line.
Sign in to open lesson →
calculateLesson 3 · 10 min read
Variables and arithmetic
Data types & operators
Store whole-number values in int variables and use them in a calculation.
Sign in to open lesson →
keyboardLesson 4 · 10 min read
Read and use user input
Console input
Read a number into a declared variable, use it in a calculation, and display the result.
Sign in to open lesson →
terminalLesson 5 · 12 min read
Calculate with C++ operators
Operators
Apply arithmetic operators and explain integer division and remainder.
Sign in to open lesson →
alt_routeLesson 6 · 10 min read
Make decisions with if and else
Conditions
Choose between two actions using a comparison and an if/else statement.
Sign in to open lesson →
repeatLesson 7 · 12 min read
Repeat with a for loop
Loops
Use initialization, a condition and an update to print a countdown.
Sign in to open lesson →
syncLesson 8 · 12 min read
Stop input with a sentinel
Loops & input
Use a while loop to process values until a sentinel appears, without adding the sentinel to the total.
Sign in to open lesson →
account_treeLesson 9 · 12 min read
Organize code with a function
Functions
Define a function with a parameter, return a calculated value, and call it from main.
Sign in to open lesson →
terminalLesson 10 · 12 min read
Store a collection in an array
Arrays
Access valid array indexes and use a loop to total five values.
Sign in to open lesson →
terminalLesson 11 · 12 min read
Work with text using strings
Strings
Store a word in std::string and combine it with a greeting.
Sign in to open lesson →
terminalLesson 12 · 12 min read
Find and fix a small bug
Debugging
Distinguish compiler, runtime and logic errors, and trace a repair.
Sign in to open lesson →
terminalLesson 13 · 12 min read
Build a classroom supplies mini-project
Mini-projects
Plan, implement and test a program that totals supplies for three teams.
Sign in to open lesson →