Practice Exercise #8

The following source file, named ex8.cc, uses a parameterized type, Range, that implements an integer type restricted to some consecutive interval (1 to 1000 in this example): When run, the following output is produced:

bash$ g++ -Wall -std=gnu++0x -g -o ex8 ex8.cc
bash$ ./ex8
x = 911
y = 44
z = 120
x+y+z = NaN
bash$
Your job is to implement Range so that the code above compiles cleanly and produces the output shown when run.

Notes: