How do I determine the highest and lowest numbers after reading a file in C++ without an array? | SoloLearn: Learn to code for FREE!

0

How do I determine the highest and lowest numbers after reading a file in C++ without an array?

c++

5/28/2020 6:29:46 PM

Jason Reese

3 Answers

New Answer

+4

Keep two variables for tracking min and max numbers. Read numbers from the file (one at a time) compare against current min and max, update min and max accordingly.

+1

Jason Reese Have you tried it by own, plz link it?

+1

Try completing some of the C++ lessons. If you get stuck on anything specific let us know.