Please help me to make a sequencing program for my Operations Research subject.
By this program, i basically need to sequence n jobs in an order.
There are three column: jobs, A, B as shown below:

Job A B
1 4 5
2 3 6
3 5 2
4 1 8

Here A and B are machines and below are the time taken by each machine to complete the particular job. Now the solution i.e. the sequence to this problem is as follows:

The minimum in A will come first, i.e the job corresponding to 1 will come first. Similarly the minimum in B will come last, i.e the job corresponding to 2 will come last. Thus the sequence becomes:

Sequence : 1 2 3 4
Job No. : 4 2 1 3

So I tried to make the program in c++ as given below, by entering the values in A and B, but now i am stuck as of how to make this sequence

#include<iostream.h>
#include<conio.h>
#include<stdio.h>

void main()
{
 clrscr();
 int a[10], b[10], i, j, k, n;
 cout<<"\n Enter the no of jobs you want to enter: ";
 cin>>n;
 cout<<"\n";
 cout<<"\n Enter the values in coloumn A: ";
 for(i=0; i<n; i++)
  cin>>a[i];
 cout<<"\n Enter the values in coloumn B: ";
 for(i=0; i<n; i++)
  cin>>b[i];
 getch();
}

Please I request you professionals to solve my this problem.

Keep in mind that not everyone here will have an operations research background. I think you're going to probably have to explain the problem a little more clearly. To avoid confusion, make sure that no time has the same value as a job number because it's not clear, to me at least, how you get from here:

Job A B
1 4 5
2 3 6
3 5 2
4 1 8

to here:

Sequence : 1 2 3 4
Job No. : 4 2 1 3

I'd do an example like this with the corresponding solution:

Job  A   B
1    5   9
2   10   8
3    7  11
4   12   6

All the numbers are different so there is less confusion about what each number represents in any solution.

I assume there is something to minimize (total time for all four jobs I imagine) and that there is exactly one machine A and one machine B, which can both be going simultaneously. Each job is done by machine A or machine B, but not both. Each machine can do only one task at a time. It'll be a familiar concept for a lot of Computer Science people because it comes up a lot, but you're going to have to take at least a paragraph or two to explain the algorithm and how it works and how you want to approach it, and give a more complete solution about what does what and why and when, etc.

Please clarify if this is NOT the goal, because this is just my best guess of what the goal is. I could be wrong and you could be talking about something else.

On a side note, thanks for using code tags on your first post!

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.