2
Contributors
3
Replies
14
Views
2 Years
Discussion Span
Last Post by gusano79
0

We don't do assignments for you. Show us your work so far, tell us what you're having trouble with, and then we'll be able to help.

0

what to do after accepting the numbers for eg. int main() { int number[20]; for(int i=0;i<20;i++) { cout<<"enter a number up to 20"<<endl; cin>>number[i];} what to do after this?

0

Please format code, something like this:

int main()
{
    int number[20];

    for(int i = 0; i < 20; i++)
    {
        cout << "enter a number up to 20" << endl;
        cin >> number[i];
    }
}

what to do after this?

I imagine you should...

sort them ascendingly using arrays.

So you have numbers in an array, number.

If this is an assignment, you shouldn't be completely unprepared; your instructor should have introduced you to at least one sorting algorithm before giving you this task.

Do you truly have no idea how to sort them? If not, that's okay--I'm just trying to figure out the best place to start.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.