0

Hey is there any way to write out example:
a
b
c..
aa
ab
ac..
ba
bb
bc..
ca
cb
cc...
and like that for every character from keyboard
To .txt file?

2
Contributors
3
Replies
19
Views
2 Years
Discussion Span
Last Post by Reverend Jim
-1

I've come up with this:

For Each a In "abcdefghijklmnopqrstuvwxyz".ToCharArray()
      objStreamWriter.WriteLine(a)
      For Each b In "abcdefghijklmnopqrstuvwxyz".ToCharArray()
            objStreamWriter.WriteLine(a + b)
For Each c In "abcdefghijklmnopqrstuvwxyz".ToCharArray()
            objStreamWriter.WriteLine(a + b + c)
      Next
      Next
      Next

Is it possible somehow just to write from min to max instead of spamming so much 'for each'es ?

Votes + Comments
Not even close to the requested solution.
0

@Trie94 - the reasons I gave such a seemingly unhelpful answer are

  1. I answered the question that was asked
  2. The poster did not show that he/she had put any effort into solving it
  3. It pretty much looks like a homework assignment

If we just do people's homework for them then the only thing they will learn is how to cut and paste code. By simply posting the entire solution you deprive the poster of a learning experience.

By the way, your solution does not produce the requested output. It's not even close.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.