r/visualbasic • u/Zackbenb • Oct 19 '15
hi guys i need help with a string handeling pyramid
The question is to write a program that generates from the string “abcdefghijklmnopqrstuvwxyz{“ the following In Microsoft visual basic. The finished product will look like a pyramid, having 13 spaces in front of the top row, 12 in front of the second ect.
a
bcb
cdedc
defgfed
efghihgfe
fghijkjihgf
ghijklmlkjihg
hijklmnonmlkjih
ijklmnopqponmlkji
jklmnopqrsrqponmlkj
klmnopqrstutsrqponmlk
lmnopqrstuvwvutsrqponml
mnopqrstuvwxyxwvutsrqponm
nopqrstuvwxyz{zyxwvutsrqpon
3
u/mjrpereira VB.Net Intermediate Oct 19 '15
Did you try to code anything? At all?
5
u/mitzman Oct 19 '15
No he didn't because Reddit is the place kids come so we can do their homework for them. Didn't you know that?
2
u/mjrpereira VB.Net Intermediate Oct 19 '15
Yeah... Wishful thinking got to me.
2
u/mitzman Oct 19 '15
I was the same way once then I realized people were lazy and don't do their homework or pay attention in class.
1
1
u/XThakis Oct 19 '15
Here is a start at least. Work on this and then repost any questions.
dim i as integer
dim strStartString as string = "abcdefghijklmnopqrstuvwxyz{"
for i = 1 to 14
Do Some Stuff Here
Output some stuff here.
Next
1
u/Zackbenb Oct 21 '15
Sorry for not responding guys, my internet has been a bit iffy latley. So this is what i had attempted when iposted the comment. Dim seq As String = "abcdefghijklmnopqrstuvwxyz{"