Essay on COMP230_W4_IP_Array_evKey

648 WordsOct 18, 20133 Pages
Student Name Class Date VBScript IP Array Lab Key In the space provided below, copy and paste your VBScript Program Code. If it doesn’t fit, use the next page for the continuation of your sourcecode program In the space provided below to copy and paste the remainder of your VBScript sourcecode. ' VBScript: IP_Array_start.vbs ' Written by: Student Name ' Date: Today's Date ' Class: COMP230 ' Professor: Professor Name ' =================================== ' This initialize a 2-dimension array ' of IP Address. The first index +100 ' is the room# and the second index+1 ' is the computer# in the room. dim ipAddress(5,3) ipAddress(0,0)="192.168.10.11" ipAddress(0,1)="192.168.10.12" ipAddress(0,2)="192.168.10.13"…show more content…
Do WScript.StdOut.Write( _ "Do you wish to Display all of the IP Addresses (Y/N) ..... ") ans = WScript.StdIn.ReadLine() If ans "Y" AND ans "y" AND ans "N" AND ans "n" Then WScript.StdOut.WriteLine(chr(7) & chr(7) & _ "Error, Y,y,N,n response Only!!!") End If Loop While ans "Y" AND ans "y" AND ans "N" AND ans "n" If ans = "Y" OR ans = "y" Then For room = 0 to 5 For computer = 0 to 3 WScript.Echo "The IP Address in Room " & CStr(room+100) & _ " for Computer " & CStr(computer+1) & " is " & _ ipAddress(room,computer) Next Next In the space provided below, copy and paste the RUN of your VBScript program: C:\VBScripts>cscript IP_Array.vbs Microsoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved. Please Enter the Room Number (100-105) ..... 108 Error, 100 to 105 Only!!! Please Enter the Room Number (100-105) ..... 101 Please Enter the Computer Number (1-4) ..... 0 Error, 1 to 4 Only!!! Please Enter the Computer Number (1-4) ..... 3 The IP Address in Room 101 for Computer 3 is 192.168.10.21 Do you wish to Display all of the IP Addresses (Y/N) ..... w Error, Y,y,N,n response Only!!! Do you wish to Display all of the IP

    More about Essay on COMP230_W4_IP_Array_evKey

      Open Document