Code tracer
Step through a program one line at a time. The highlighted line is about to run, the table shows every variable, and changed values light up.
1#include <iostream>
2
3int main() {
4 int total = 0;
5 for (int i = 1; i <= 5; i++) {
6 total += i;
7 }
8 std::cout << "Total: " << total << std::endl;
9 return 0;
10}
total is created and set to 0.
Variables
| total | 0 |
Output
Step 1 of 14
These are prepared example programs. Each one matches a lesson in the C++ or C# path, where you'll find it under the Step through tab.