Comp 230 Ilab W2

Submitted by: Submitted by

Views: 440

Words: 889

Pages: 4

Category: Science and Technology

Date Submitted: 08/19/2013 04:59 PM

Report This Essay

Student Name | Martin Gonzalez | Class | COMP 230 | Date | 16 July 13 |

VBScript IPO VBox Lab Report

' VBScript: NameAge.vbs

' Written by: Martin Gonzalez

' Date: 16 July 2013

' Class: COMP230

' Professor: Stanley Kuchel

' =================================================================

'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 )

' Display Name and Age Values

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 will be....." & ageStr10 & vbCrLf)

WScript.StdOut.WriteLine("End of Program")

' VBScript: NameAge.vbs

' Written by: Martin Gonzalez

' Date: 16 July 2013

' Class: COMP230

' Professor: Stanley Kuchel

' =================================================================

'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 )

' Display Name and Age Values

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...