Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old December 4th, 2004, 10:27 PM
Marcella Marcella is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 4 Marcella User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Trace table for VB program--HELP!

Hi! I'm hoping someone might be able to help me out with completing the trace table for the following VB program. I need to show the value of each variable as it changes throughout the execution and, show all output. I'm taking a course at university and my final is fast approaching! I'm hoping someone can help me with this as my prof has informed me that a similar question will be on the final. Please help! I am so lost and I would appreciate the help more than you know.


Marcella

Private Sub cmdCompute_Click()
Dim lower As Integer, upper As Integer
Dim index As Integer, num As Integer
1. num = 0
2. lower = Val(InputBox("Enter a value for lower"))
3. upper = Val(InputBox("Enter a value for upper"))
4. index = lower
5. Do While (index < upper)
6. If (upper Mod index = 0) Then
7. num = num + index
8. Picture1.Print "Here is one, " ; index
End If
9. index = index + 3
10. Loop
11. Picture1.Print "The total value is "; num
End Sub

Assuming input for the program will be 3 and 12.


Step Lower Upper Index Num Index<Upper(T/F) Upper Mod Index=0(T/F) Output














Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Trace table for VB program--HELP!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway