There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot browser bsod computer connection cpu crash css dell desktop driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor network networking outlook outlook 2003 outlook 2007 outlook express password popups problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
VB Help


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
bootsiebella's Avatar
Junior Member with 12 posts.
 
Join Date: Mar 2008
17-Apr-2008, 11:41 AM #1
VB Help
Can anyone help me out with this please
Code:
[inlinecode]
1.	Identify (describe) and correct the error(s) (copy and correct the code without changing the intent of the code) in each of the following: 	

a.	Assume that the variable x is declared as Integer.
For x = 100 To 1
	lblOutput.Text = “X equals ” & x

b.	The following code should print whether the Integer variable’s value is odd or even: 
Select (value Mod 2)
	Case 0
		lblOutput.Text = “Even integer”
	Case 1
		lblOutput.Text = “Odd integer”
Select End

c.	The following should output the odd Integers from 19 to 1:
For (x = 19 To 1 Step 2)
	lblOutput.Text = “X equals ” & x
Next x

d.	Assume that variables a, b, x, and j are declared as Integer.
For j = 1 To 200
	For j = 11 To 777 Step 11
		x = a * b
		lblOutput.Text = “X equals ” & x
	Next j
Next j

e.	The following code should output the even Integers from 2 to 100:
counter = 2
Do Loop
	counter = counter + 2
	lblOutput.Text = “Counter equals ” & counter
While counter < 100
[/inlinecode]
coderitr's Avatar
Distinguished Member with 3,080 posts.
 
Join Date: Oct 2003
17-Apr-2008, 09:22 PM #2
Since this is clearly coursework, perhaps you could explain which portions you're having trouble with. I know the answers but to give them to you would be cheating.
Zack Barresse's Avatar
Computer Specs
Distinguished Member with 3,302 posts.
 
Join Date: Jul 2004
Location: Oregon, United States
Experience: I'ma learnin'!
18-Apr-2008, 11:32 PM #3
Hi there,

Yes, we could answer this, but I for one certainly won't. This is, as stated by coderitr, homework. You must have coursework with you. Look it up. I know it sounds harsh, but you're paying to learn, not to cheat. Learning this will be much better. Some hints? Sure. Try stepping through your code with real examples. You should soon see what is going on.
__________________
___________
Regards, Zack - MVP - MS Excel 2005-2008 (If you would like comments in any code, please say so.)

OfficeArticles.com :|: Extreme Excel Tutorial :|: Excel Articles by Ken Puls :|: Excel User Group, by Nick Hodge

What is a Microsoft MVP? :|: Live Tech Support? Click here
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:43 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.