Algorithm : Rogue Values | ||||||||||||||||||||||||||||||||||||||||||||||||||
A sequence of inputs may continue until a specific value is input. This value is called a rogue value and must be a value which would not normally arise. A rogue value lets the computer know that a sequence of input values has come to an end. Example A number of marks is to be input (terminated by a rogue value of -1). How many of them are over 50? Note that -1 is a value
which would not arise.
You will need to be careful
that you do not 'process' the rogue value!
|
||||||||||||||||||||||||||||||||||||||||||||||||||