View previous topic :: View next topic
|
Author |
Message |
Prabha Warnings : 2 New User
Joined: 05 Dec 2005 Posts: 79
|
|
|
|
Hi,
I need to sort an element with array size 3 using PL/1 program(Not in jCL)
Array is declared as
DCL 1 Arr(3),
2 DIS1 fixed(5),
2 DIS2 fixed(5)
Input is
DIS1 DIS2
100 20
80 10
120 20
O/p should be
Input is
DIS1 DIS2
80 10
100 20
120 20
Pls help. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Please write with your own logic,
possibly.., Bubble sort, Quick sort, etc... |
|
Back to top |
|
|
AMITESH Currently Banned New User
Joined: 28 Feb 2008 Posts: 3 Location: kolkata
|
|
|
|
In this case sorting is very easy. you only take care of DIS1 .
If the size of array is 3(fixed) you can do it by if else loop otherwise try to sort it by bubble sort which is the easiest one. |
|
Back to top |
|
|
|