RosettaCodeData/Task/Hash-from-two-arrays/Ring/hash-from-two-arrays.ring
2023-07-01 13:44:08 -04:00

14 lines
279 B
Text

# Project : Hash from two arrays
list1="one two three"
list2="1 2 3"
a = str2list(substr(list1," ",nl))
b = str2list(substr(list2," ",nl))
c = list(len(a))
for i=1 to len(b)
temp = number(b[i])
c[temp] = a[i]
next
for i = 1 to len(c)
see c[i] + " " + i + nl
next