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 ???![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)
Thanks in advance.![[thumbsup2] [thumbsup2] [thumbsup2]](/data/assets/smilies/thumbsup2.gif)
cheers![[bigsmile] [bigsmile] [bigsmile]](/data/assets/smilies/bigsmile.gif)
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 ???
![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)
Thanks in advance.
![[thumbsup2] [thumbsup2] [thumbsup2]](/data/assets/smilies/thumbsup2.gif)
cheers
![[bigsmile] [bigsmile] [bigsmile]](/data/assets/smilies/bigsmile.gif)