Friday 6 April 2012

Print duplicates


x=array(1,1,2,3,3,5,7,9)
For i=0 to UBound(x)
If instr(b,x(i))=0 Then
b=b&x(i)
elseif instr(b,x(i))>0 then
print x(i)
End If
Next

1 comment:

  1. how to Input:
    "SwetaSingh Sadhana RamKendrinath Singh"

    Output:
    SwetaSingh :
    Sadhana :
    RamKedrinath:
    Singh :

    Find the largest word and add a semicolon after every word. Here RamKedrinath has the largest length, so semicolon is added after every word equivalent to the length of the largest word count.

    ReplyDelete