writting a while loop

how to Write a while loop that determines the biggest number of positive integers. The input list ends with 0 or any negative number? just need an example.

while ( ( std::cin >> number ) && ( 0 < number ) )
{
....
}
Topic archived. No new replies allowed.