Submitted by: Submitted by electrikkidd
Views: 11
Words: 563
Pages: 3
Category: Science and Technology
Date Submitted: 05/10/2016 09:46 PM
Student Name | Luis Hernandez | Class | Comp230 | Date | 5/10/2016 |
VBScript IPO Lab Report
' VBScript: NameAge.vbs
' Written By: Luis Hernandez
' Class: COMP230
' Professor: Randall Maynes
' =================================
' 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 is ...... " & _
ageStr10 & vbCrLf)
WScript.StdOut.WriteLine("End of Program")
' VBScript: NameAge.vbs
' Written By: Luis Hernandez
' Class: COMP230
' Professor: Randall Maynes
' =================================
' 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 is ...... " & _
ageStr10 & vbCrLf)
WScript.StdOut.WriteLine("End of Program")
Copy your NameAge.vbs...