cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Find Max & min value of input stream wit
Find Max & min value of input stream without arrays and vectors
Apr 30, 2020 at 4:14pm UTC
sadibekov
(6)
Dear programmers,
I need to find Max & min value of input stream without arrays and vectors
Last edited on
Apr 30, 2020 at 4:14pm UTC
Apr 30, 2020 at 4:23pm UTC
George P
(5518)
Easy peasy, store the first value retrieved as both min and max. Compare each new value with the previously stored min/max. Change as needed, lather, rinse and repeat until the stream is empty.
Topic archived. No new replies allowed.