Can anybody write a program for me in C by Thusday morning?

I know this but I need something bigger which is related to my school work... Can u help me with that?

I haven't done coding since 5 years now and I need a program written in C where the definition of the program is as follows:

Another simple sort is the odd-even sort. The idea is to repeatedly make two
passes through the array. On the first pass you look at all the pairs of items,
a[j] and a[j+1], where j is odd (j = 1, 3, 5, …). If their key values are out of
order, you swap them. On the second pass you do the same for all the even
values (j = 2, 4, 6, …). You do these two passes repeatedly until the array is
sorted. Replace the bubbleSort() method in bubbleSort.java (Listing 3.1) with
an oddEvenSort() method. Make sure it works for varying amounts of data.
You’ll need to figure out how many times to do the two passes.
The odd-even sort is actually useful in a multiprocessing environment, where a
separate processor can operate on each odd pair simultaneously and then on
each even pair. Because the odd pairs are independent of each other, each pair
can be checked—and swapped, if necessary—by a different processor. This
makes for a very fast sort.

But the Prof. is gonna run the rogram on gcc with a single command line file
that will have a very large number of random ints (at least 1000, perhaps significantly more and they might be positive, negative , or zero). The very first number in the file, however, is not actual data, but rather it specifies the number of numbers after it. So you will want to calloc an array to store the data so that the array is the correct size.

If you want help here, you're going to have to show some work, then ask questions if you get stuck. Don't expect anyone here to do your homework for you.

The rules here are that for school work we will help you AFTER you have made an honest effort at solving your problem. So far, you are just asking us to cheat for you... :-(

nmaillet and rubberman I have made an effort and its not working thats the reason I am asking for it and I suck at C. Like I did my another assignment last Thursday which was on Java which worked out good and I got 94 on it... So its not that I am not trying.

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