CodeTheRobot

C++ Beginner · exercise 08

Debugging & first tests

Write a tiny test harness that proves a range check behaves correctly.

C++ Beginner lesson 08

Guided steps

  1. 1.Implement bool inRange(double value, double low, double high).
  2. 2.Check three cases: below, inside and above the range.
  3. 3.Print pass or fail per case, then a final line when all cases pass.

Your code

Your code is saved in this browser after every run and restored next time.