In a C++ function
How to check if the minimum and maximum values of an array are not equal and the minimum and maximum values of the array are not adjacent to one another.
Also the minimum value occurs exactly once in the array and the maximum value occurs exactly once in the array.
Recommended Answers
Jump to PostAs the code stands, I see nothing wrong with it. It does exactly what you told it to -- tells you if each of two values are in the proper order, and which values.
If that's not what you want, you need to tell us more than "what's wrong …
Jump to PostAs per your first post, now find the min and the max value of the array and display the values to the screen so you can prove you have the correct value.
Jump to PostThanks
I want this funcion to print "true" (just once, not for every element )if the array is in a ascending orderHow does that post come close to explaining:
You need to tell us what you wanted, what the code is doing, and what the code should have done. …
All 10 Replies
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster
munadel 0 Newbie Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Lerner 582 Nearly a Posting Maven
munadel 0 Newbie Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
munadel 0 Newbie Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
munadel 0 Newbie Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
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.