I need to write a program that will enter integers until 0 is entered. then the program needs to return the highest integer and the lowest integer. How do I return those integers.

Read a number, set both the min and max to that number. For each new number you read, if it's larger than the max, assign it to max and if it's smaller than the min, assign it to min.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.