コンテンツへスキップ

Lesson 56: Trace with the board

English

Let the board check your trace

  • A trace table follows an algorithm by hand: one row each time a value changes.
  • In this lesson you write the exam algorithm in C++ and let the board print the rows.
  • First fill in the trace table on paper. Then run the program and compare.

Words for this lesson

Word Meaning
trace table a table of the values of the variables as the algorithm runs
dry run working through an algorithm by hand
rogue value a value that stops input, like −1 here

ログインまたはアカウント作成

IGCSE, A-Level & AP