please help me, i'm a student..our teacher wants us to make a program that will merge two arrays into one and sort it into ascending order, but she didn't taught us how to..please give me an example code?

You missed to read the rules of the forum. We don't give any code away without you posting what you have done to show effort.

To help you out a little bit, here is a logical walkthrough of how you could do it.

You have two arrays. Make a third array. Using a loop, put the first array into the third array. Note the position where you finish and from there, put in the second array. Then sort the third array.

I assume you have a textbook. This should not be very difficult.

Comments
a proper response

but she didn't taught us how to

She didn't teach you because it's for you to figure out (of course I'm assuming your teacher has taught you the basics)

You missed to read the rules of the forum. We don't give any code away without you posting what you have done to show effort.

I was wondering whether we can even post our algorithms if the thread starter didn't even post a single code or algorithm of his/her own.

Edited 6 Years Ago by xavier666: n/a

I was wondering whether we can even post our algorithms if the thread starter didn't even post a single code or algorithm of his/her own.

there's no cut and dry rule, but you should put forth roughly the same detail and/or effort as the poster did in asking the question.

considering what the OP asked, i think c0d3x's response was perfect.

if the OP comes back with some code, then s/he can get more detailed response.

but you should put forth roughly the same detail and/or effort as the poster did in asking the question

Apt

Thanks

This article has been dead for over six months. Start a new discussion instead.