Submitted by: Submitted by biglexlost
Views: 371
Words: 635
Pages: 3
Category: Science and Technology
Date Submitted: 07/25/2013 03:23 PM
Student Name | Victor Jimenez | Class | COMP230 | Date | 17 Mar 13 |
VBScript IPO VBox Lab Report
' VBScript: NameAge.vbs
' Written by:
' Date: 17 Mar 13
' Class: COMP230
' Professor:
'Create name and age variables
name = ""
ageStr = ""
'Prompt User for Name and Age
WScript.StdOut.Write("Please Enter your Full Name ... ")
name = WScript.StdIn.ReadLine()
WScript.StdOut.WriteLine() 'Skip 1 line
WScript.StdOut.Write("Please Enter your age ......... ")
ageStr = Wscript.StdIn.ReadLine()
'Calculate Age+10 and assign to ageStr10
ageStr10 = CStr( CInt(ageStr)+10 )
WScript.StdOut.WriteBlankLines(2) 'Skip 2 lines
WScript.StdOut.WriteLine("Your Name is " & vbTab & vbTab & name)
WScript.StdOut.WriteLine("Your Age is " & vbTab & vbTab & ageStr)
WScript.StdOut.WriteLine(vbCrLf & "Your Age in 10 years is ......" & _
ageStr10 & vbCrLf)
WScript.StdOut.WriteLine("End of Program")
Copy your NameAge.vbs program from NotePad++ and paste it into the space provided below:.
Capture the NameAge.vbs Run from the console window and copy it into the space provided below:
cscript NewAge.vbs
Process started >>>
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
Please Enter your Full Name ... Victor Jimenez
Please Enter your age ......... 34
Your Name is Victor Jimenez
Your Age is 34
Your Age in 10 years is ......44
End of Program
<<< Process finished.
' VBScript: PopUpWindow.vbs
' Written by: Victor Jimenez
' Date: 17 Mar 13
' Class: COMP230
' Professor: Thomas Lehmann
'Create name and age variables
name = "John Doe"
ageStr = "50"
'Calculate Age+10 and assign to ageStr10
ageStr10 = CStr( CInt(ageStr)+10 )
'Build output as a single string msgStr
msgStr = "Your Name is " & vbTab & vbTab & name & _
vbCrLf & "Your Age is " & vbTab & vbTab & ageStr & _
vbCrLf &...