cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
user name:
password:
Forgot your password?
please wait
try again
cancel
forgot your password?
sign up
log in
[Legacy version]
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
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
Apr 30, 2020 at 4:14pm UTC
Apr 30, 2020 at 4:23pm
Apr 30, 2020 at 4:23pm UTC
deleted account xyzzy
(5768)
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.