To get all combinations of ABC

Hi ,

I want to get all combinations of ABC to use in my scirpt
like

ABC
BAC
CAB
BCA....

how to do this.

Please do needful

Comments

  • EggplantMattEggplantMatt ForumAdmin admin
    So looking at your example, it appears that you don't care if you have duplicates (e.g., ABC and CBA). In which case, the code would just be something like this:
    repeat with first = each item of (A, B, C)
    	repeat with second = each item of (A, B, C)
    		repeat with third = each item of (A, B, C)
    			put first && second && third
    		end repeat
    	end repeat
    end repeat
    
  • chintuchintu Member
    no it should not allow duplicates like AAB .BCC.......
    it should contain 3 letters but with ABC combination only
Sign In or Register to comment.