Professional Documents
Culture Documents
Chris Trimble Unit7 Lab
Chris Trimble Unit7 Lab
Chris trimble
7.3
Chris trimble
7.4
7.5
Chris trimble
Pseudocode
Enter Pseudocode here
VB edit with control count loop
Module Module1
Sub Main()
pingMe()
openWebsite()
finalOutput()
End Sub
Sub pingMe()
Shell("Ping.exe 127.0.0.1", , True)
End Sub
Sub openWebsite()
Dim myURL As String = "http://www.homedepot.com"
System.Diagnostics.Process.Start(myURL)
End Sub
Sub finalOutput()
Console.ReadLine()
Console.WriteLine("Ping.exe allows you to verify that you have a network
connection.")
Console.WriteLine("The Shell function allows you to run a program in the
console.")
Console.WriteLine("Dim is how we denote a DISPLAY command.")
'this causes a pause so you can see your program
Console.ReadLine()
Console.Write("Press enter to end...")
Console.ReadLine()
End Sub
End Module
Module Module1
Sub Main()
Dim keepGoing As String = "y"
While keepGoing = "y"
Call displayPower()
Console.WriteLine("Would you like to ping again? If so type y.")
Chris trimble
keepGoing = Console.ReadLine()
End While
End Sub
Sub displayPower()
Dim counter As Integer = 1
Dim toPower As Integer = 0
Dim number As Integer = 2
While counter <= 7
toPower = 2 ^ number
Console.WriteLine("2 to the power of " & number & " = " & toPower)
counter = counter + 1
number = number + 1
End While
End Sub
End Module