Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: [RESOLVED] Do while loop question

Started 2 months, 2 weeks ago by noreaga_ls
[RESOLVED] Do while loop question I have this do while loop that I am having trouble with. I need to know how to make the loop continue to the next line after it has looped around once. So far I have it outputting like this. $*$*$*$*$*$*$*$* But what I really need it to do is output like this $*$*$*$*$*$*$*$* ...
Site: VBForums - Visual Basic and VB .NET Discussions and More!  VBForums - Visual Basic and VB .NET Discussions and More! - site profile
Forum: Visual Basic .NET  Visual Basic .NET - forum profile
Total authors: 8 authors
Total thread posts: 16 posts
Thread activity: no new posts during last week
Domain info for: vbforums.com

Other posts in this thread:

ForumAccount replied 2 months, 2 weeks ago
Re: Do while loop question You'll want to post your code up to see how you are outputting this. Also is this homework? __________________ A first chance exception of type 'System.NullReferenceException' occurred in Signature. Signature reference not set to an instance of an ...

noreaga_ls replied 2 months, 2 weeks ago
Re: Do while loop question Yes it is homework, thats why I didn't post the code, I just really want an explaination of the do while loop or for someone to guide me to a tutorial and sample about it.

rjv_rnjn replied 2 months, 2 weeks ago
Re: Do while loop question You may think of putting another outer loop that will insert the line breaks(new line character) and also control how many lines of $*$* to put on console (may be take the user input).

Vectris replied 2 months, 2 weeks ago
Re: Do while loop question A tutorial or sample would be doing the work for you. If you want help you need to post your code so we can help you. It's really quite simple, all you need are two for loops, one within the other. One loops through the rows, the other columns, that's it. ...

noreaga_ls replied 2 months, 2 weeks ago
Re: Do while loop question Ok those both sound like great ideas thanks for the help I will have to more research on how to insert that other loop, I'm new to vb and out teacher wants us to figure out mostly everything for ourself.

Shaggy Hiker replied 2 months, 2 weeks ago
There's an oddity to that pattern that will take a bit more effort. The lines alternate. If they were all the same, that would be easier, but the alternating does add a modest amount of interest, as you will need to keep track of what the starting character needs to be.

Shaggy Hiker replied 2 months, 2 weeks ago
Re: Do while loop question There's an oddity to that pattern that will take a bit more effort. The lines alternate. If they were all the same, that would be easier, but the alternating does add a modest amount of interest, as you will need to keep track of what the starting character needs to be....

Pradeep1210 replied 2 months, 2 weeks ago
Re: Do while loop question You can check for even and odd rows to determine which character to begin with. Then just alternate between the two characters. e.g. like this: (not tested code) vb.net Code: Private Sub Button1_Click ( ByVal sender As System. Object , ByVal e As System. EventArgs ) Handles...

Vectris replied 2 months, 2 weeks ago
Re: Do while loop question Pradeep I'm disappointed. Most of the people on the forums have picked up that you don't just give someone their homework assignment. Next time please refrain from making people's assignments for them. __________________ If your problem is solved, click...

minitech replied 2 months, 2 weeks ago
Re: Do while loop question Use a counter and increment it with every loop. If n Mod 2 is 0, then output $*$*$*$*$*$*, otherwise output *$*$*$*$*$*$. Simple enough. __________________ MINITECH, VB.NET Programmer The #1 thing that annoys me: when people's signatures are longer...

 

Top contributing authors

Name
Posts
noreaga_ls
6
user's latest post:
[RESOLVED] Do while loop question
Published (2009-10-14 10:21:00)
Re: Do while loop question I finally figured it out and got it to work I was leaving out 1 small line. Thanks everyone for your help. Moving on to the final pattern.
Vectris
3
user's latest post:
[RESOLVED] Do while loop question
Published (2009-10-13 18:20:00)
Re: Do while loop question A while loop can do the same things a for loop does. __________________ If your problem is solved, click the Thread Tools button at the top and mark your topic as Resolved ! If someone helped you out, click the button on their post and leave them a comment to let them know they did a good job __________________ My Vb.Net CodeBank Submissions: Microsoft Calculator Clone Custom TextBox Restrictions Get the Text...
Shaggy Hiker
2
user's latest post:
Do while loop question
Published (2009-10-13 15:20:00)
There's an oddity to that pattern that will take a bit more effort. The lines alternate. If they were all the same, that would be easier, but the alternating does add a modest amount of interest, as you will need to keep track of what the starting character needs to be.
ForumAccount
1
user's latest post:
[RESOLVED] Do while loop question
Published (2009-10-13 14:04:00)
Re: Do while loop question You'll want to post your code up to see how you are outputting this. Also is this homework? __________________ A first chance exception of type 'System.NullReferenceException' occurred in Signature. Signature reference not set to an instance of an object.
rjv_rnjn
1
user's latest post:
[RESOLVED] Do while loop question
Published (2009-10-13 14:14:00)
Re: Do while loop question You may think of putting another outer loop that will insert the line breaks(new line character) and also control how many lines of $*$* to put on console (may be take the user input).
JuggaloBrotha
1
user's latest post:
[RESOLVED] Do while loop question
Published (2009-10-14 07:40:00)
Re: Do while loop question I would start with two For loops and a boolean for the last char, when the inner loops stops, set the bool to not itself then at the start of the next iteration check the bool. __________________ Currently using: VS 2005 & 2008 Pro w/sp1 on WinXP Pro w/sp3. There are 3 kinds of people in the world: Those who can count and those who can't. 4 out of 3 people have trouble with fractions. "Sleep is...
Pradeep1210
1
user's latest post:
[RESOLVED] Do while loop question
Published (2009-10-13 16:07:00)
Re: Do while loop question You can check for even and odd rows to determine which character to begin with. Then just alternate between the two characters. e.g. like this: (not tested code) vb.net Code: Private Sub Button1_Click ( ByVal sender As System. Object , ByVal e As System. EventArgs ) Handles Button1. Click     Const MaxRows As Integer = 10     Const MaxColumns As Integer = 15...
minitech
1
user's latest post:
[RESOLVED] Do while loop question
Published (2009-10-13 17:55:00)
Re: Do while loop question Use a counter and increment it with every loop. If n Mod 2 is 0, then output $*$*$*$*$*$*, otherwise output *$*$*$*$*$*$. Simple enough. __________________ MINITECH, VB.NET Programmer The #1 thing that annoys me: when people's signatures are longer than their posts. I also don't like it when people's signatures have too much thought put into them, when you have to spend time reading them or looking...

Related threads on "VBForums - Visual Basic and VB .NET Discussions and More!":

Related threads on other sites:

Thread profile page for "[RESOLVED] Do while loop question" on http://www.vbforums.com. This report page is a snippet summary view from a single thread "[RESOLVED] Do while loop question", located on the Message Board at http://www.vbforums.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity