Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,071 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,803 people online right now. Registration is fast and FREE... Join Now!




Selection structure visual basic 2005

 
Reply to this topicStart new topic

Selection structure visual basic 2005, for counter

ratting
27 Feb, 2008 - 07:33 PM
Post #1

New D.I.C Head
*

Joined: 26 Feb, 2008
Posts: 2

please give tips on how to solve these questions

1.How many times will the messagebox.show in the
following code be processed

for counter as integer = 4 to 11 step 2
messagebox.show ("hello")
next counter

2.What is the value stored in th counter variable when
the loop in question 1 stops?
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Selection Structure Visual Basic 2005
27 Feb, 2008 - 08:03 PM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Post your code like this: code.gif

Thanks smile.gif
User is offlineProfile CardPM
+Quote Post

KeyWiz
RE: Selection Structure Visual Basic 2005
1 Mar, 2008 - 09:08 AM
Post #3

D.I.C Regular
Group Icon

Joined: 26 Oct, 2006
Posts: 428


Dream Kudos: 125
My Contributions
QUOTE(ratting @ 27 Feb, 2008 - 08:33 PM) *

please give tips on how to solve these questions

1.How many times will the messagebox.show in the
following code be processed

for counter as integer = 4 to 11 step 2
messagebox.show ("hello")
next counter

2.What is the value stored in th counter variable when
the loop in question 1 stops?


Here is how you do it.

Write a program which implements that particular block of code
Add a counting varriable each time the word Hello is displayed to the screen
print the varriable from the loop AFTER completeing the code block

Simple.

Or, read the code and follow the logic, both will give you the correct answers


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 11:01PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month