How will I arrange 5 numbers in ascending order and determine the highest? what codes will i use or how will i do it? (using dev c++)
TimLloyd31 0 Newbie Poster
Recommended Answers
Jump to PostHi Tim,
The C++ language provides support for sorting and for selecting the maximum value, which makes this really easy. If Dev C++ doesn't come with that support, or if this is homework and you're expected to roll your own, you'll need to sort the values yourself and find the …
Jump to PostC++ supporting sorting and searching techniques can be found in <algorithm> header file. Dev C++ provides algorithm header.
Just include it :
# include < algorithm >
Jump to PostFor values like 5, any sorting algo will work fine I suppose. As for OP, if he wants to learn how sorting is done, then he should start with basics like selection sort, …
All 11 Replies
Bob 15 using namespace Bob Team Colleague
np complete 8 Newbie Poster

iamthwee
MandrewP 60 Junior Poster in Training
TimLloyd31 0 Newbie Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Bob 15 using namespace Bob Team Colleague
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
np complete 8 Newbie Poster
myk45 commented: Nice links. :) +0
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.