Hello everyone,
i tried to make a program with Ruby but i came up with results who doesn't help me.
somehow the result doesn't show up as i requested.

letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o',
'p','q','r','s','t','u','v','w','x','y','z']

name = "bbb"

i=0
j=0
k=0

for i in 0..25 do
for j in 0..25 do
for k in 0..25 do

trying = letters[i]+letters[j]+letters[k]

        if trying == name
            puts "matched"
            puts name
            else
            puts "not matched"
        end



end 
end
end 

i=1+i
j=1+j
k=1+k       

system("pause")

You could modify your code to work like this:

letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o',
'p','q','r','s','t','u','v','w','x','y','z']

name = "bbb"

i=0
j=0
k=0

blnFound = false

for i in 0..25 do
   for j in 0..25 do
      for k in 0..25 do

         trying = letters[i]+letters[j]+letters[k]
         if trying == name
            blnFound = true
            puts "matched"
            puts name
            break            
         else
            puts trying
        end
      end

      if blnFound
         break
      end
   end
   if blnFound
      break
   end
end 

system("pause")