Orchid XP v8 wrote:
> Warp wrote:
>> Wouldn't it be simpler to do it like:
>>
>> if(number == target) break;
>> if(number < target) std::cout << "Too low.\n";
>> else std::cout << "Too high.\n";
>
> Mmm, I guess that would also work...
The pendant in me wants to have an actual condition as the argument to
"while". :-) Or at least
do {
....
} while (number != target);
--
Darren New / San Diego, CA, USA (PST)
Post a reply to this message
|