跳到主要内容

Lesson 50: Find the errors

English

Be the tester

  • Every exam has an algorithm with errors in it: find each error and write the correction.
  • Here the algorithms are C++ programs you can run. Run each one first and compare what it does with what it should do.
  • Change one thing at a time, then run again.

Words for this lesson

Word Meaning
syntax error breaks the rules of the language: the program does not compile
logic error the program runs but gives the wrong result
test data inputs with a known correct answer
trace follow the program line by line with the values

登录或创建账户

IGCSE, A-Level & AP