|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Trace table for VB program--HELP! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|