#include <iostream>
int main()
{
int number = 10;
while (number <= 10, 0 <= number)
{
std::cout << number << std::endl;
--number;
}
return 0;
}
The output prints 10...0. However with while (0 <= number, number <= 10) or while (0 <= number <= 10) the output prints 10...(infinite negative no.s). in fact, while (number <= 10, 0 <= number) seems to be the only one that prints 10...0.
Why is this so?