If I enter the pair (34, 17), your program changes it to the interval (17,
34). Because the pair, as entered, (i.e. a=34 and b=17) violates the a<=b
relationship, why doesn't your program print an error message?
The first sentence of the input section of the assignment is "Input is a
sequence of integers; consecutive pairs of integers are the endpoints for an
interval." In other words, input is not intervals, but interval endpoints. By
themselves, there's no order requirement on interval endpoints; order only
matters when they combine form an interval.
Received on Sun Feb 11 2007 - 19:10:37 EST
This archive was generated by hypermail 2.2.0 : Sun Feb 11 2007 - 21:05:48 EST