I want to do coding on C++ using arrays for the numbers 20,-10,50,4,10,2,6 in ascending order.....

William Hemsworth commented: And I want a decent question.. ;) -1

Recommended Answers

All 8 Replies

i want an instant answer

First!

Is that instant enough for you?

Btw: is there any question to answer at all? ...

>>i want an instant answer
With a title like that most people will just ignore you.

And you have to be a lot more specific about what you need. There are billions of different answers to the crappy way you formatted your question or statement.

>>i want an instant answer
With a title like that most people will just ignore you.

And you have to be a lot more specific about what you need. There are billions of different answers to the crappy way you formatted your question or statement.

come on people i dont know programming much but i have to tell my teacher that i can do help me out the question given to me was arrange those numbers in ascending order using arrays the language v r doing is C++ so in i want it in C++ format...

commented: Instant answer: You fail. -3

First!

Is that instant enough for you?

Btw: is there any question to answer at all? ...

come on i think u can help me out

He did, by telling you, "you need a question, if you want an answer"(in other words). Try what Freak_Chris posted.

google "bubble sort algorithm" and you will find lots of example code.

Here's a couple of ascending orders....

int arr[] = { 20,-10,50,4,10,2,6 };
for ( int i = 0 ; i < 7 ; i++ ) {
  setvolume(i);                 // 0 is silence, 7 is deafening
  say( arr[i] );  // number to speech function
}

int arr[] = { 20,-10,50,4,10,2,6 };
for ( int i = 0 ; i < 7 ; i++ ) {
  setfrequency(i*1000+1000);    // in Hz
  say( arr[i] );  // number to speech function
}

Meanwhile, in other news

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.