Highlighted
Absent Member.
Absent Member.
441 views

Arrays and Tables (SORT and SEARCH)

Hi

Guessing this kind of thing has been used by many COBOL programmers.


There is a TABLE of 10-digit numbers.
User enters (ACCEPT) how many such numbers they require.

an ARRAY of 5 x 2-digit RANDOM numbers is loaded.

That ARRAY ( 10-digits ) will be added to the TABLE.


Seems easy enough, but DUPLICATES in an ARRAY need to be prevented.

I suspect (hope) there might be an algorithm that will cope
with this in one go ???


Thanks in advance.

cheers   

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.