Jump to content


How to arrange a set of results in descending order in C++ ?

Recommended Posts

does anyone know a way of how i could get a set of results displayed in descending order?

Share this post


Link to post
Share on other sites
does anyone know a way of how i could get a set of results displayed in descending order?

 

Yeah start at the highest denominator and work down :loopy:

Share this post


Link to post
Share on other sites

my program is supposed to use input numbers which are then used in a mathematical formula and give me a result, i need to do this several times, so i get several sets of results, and then i need to display these results in descending order...

Share this post


Link to post
Share on other sites

average the numbers out then from 10 to 0 Doh ?:loopy:

Share this post


Link to post
Share on other sites

Store the results in an array, bubble sort it, display it - done.

Share this post


Link to post
Share on other sites
average the numbers out then from 10 to 0 Doh ?:loopy:

 

can you give me an idea of how to do this? i'm a beginner

Share this post


Link to post
Share on other sites
average the numbers out then from 10 to 0 Doh ?:loopy:

 

If you don't want to assist just ignore the post !

Share this post


Link to post
Share on other sites

I would have been suprised if there wasn't a sort function in C++, it's a basic requirement for most languages.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

X