'creating empty Strings
s=""
s1=""
'The below is the given array
a=array(1,2,3,4,5)
'Checking whether the item is odd or even
for i=0 to ubound(a)
if a(i) mod 2 = 0 then
s=s&a(i)
else
s1=s1&a(i)
end if
next
'concatenating odd & even
str=s1&s
cou=len(str)
'Adding all the element in the string to array
for i=1 to cou
st=mid(str,i,1)
a(i-1)=st
Next
mystr=join(a)
'Verifying whether the array is as per the requirement
msgbox mystr
s=""
s1=""
'The below is the given array
a=array(1,2,3,4,5)
'Checking whether the item is odd or even
for i=0 to ubound(a)
if a(i) mod 2 = 0 then
s=s&a(i)
else
s1=s1&a(i)
end if
next
'concatenating odd & even
str=s1&s
cou=len(str)
'Adding all the element in the string to array
for i=1 to cou
st=mid(str,i,1)
a(i-1)=st
Next
mystr=join(a)
'Verifying whether the array is as per the requirement
msgbox mystr