להלן פתרונות לתרגילים:
תרגיל 1
תרגיל 3
תרגיל 1
option explicit
dim Fname,Lname,age,city
Fname=inputbox("Please enter your First Name","Personal Information")
Lname=inputbox("Please enter your First Name","Personal Information")
age=inputbox ("Please enter your age","Personal Information")
city=inputbox("Please Enter Your City","Personal Information")
Lname=inputbox("Please enter your First Name","Personal Information")
age=inputbox ("Please enter your age","Personal Information")
city=inputbox("Please Enter Your City","Personal Information")
msgbox "YOUR NAME IS " &Fname+" "&Lname,,"Personal Information"
msgbox "YOUR AGE IS " &age,,"Personal Information"
msgbox "YOUR CITY IS " &city,,"Personal Information"
msgbox "YOUR AGE IS " &age,,"Personal Information"
msgbox "YOUR CITY IS " &city,,"Personal Information"
תרגיל 2
option explicit
dim scale,area
dim pi,radius
dim pi,radius
pi=3.14
msgbox "Welcome to Diameter" & vbcr & "This will calculate your Circle :-)",vbokcancel+vbinformation,"DIAMETER"
radius = inputbox("Enter Radius","DIAMETER")
radius = inputbox("Enter Radius","DIAMETER")
scale = 2*pi*radius
msgbox "The Scale circuit is " &scale ,vbinformation,"DIAMETER"
msgbox "The Scale circuit is " &scale ,vbinformation,"DIAMETER"
area = pi*radius*radius
msgbox "The circle area is " &area ,vbinformation,"DIAMETER"
msgbox "The circle area is " &area ,vbinformation,"DIAMETER"
תרגיל 3
option explicit
dim length,width
dim area
dim area
msgbox "This Script Will Calculate Your Rectangle " & vbcr & "LENGTH & WIDTH",vbinformation,"*** Rectangle Calculator ***"
length=inputbox("Please Enter Rectangle Length","*** Rectangle Calculator ***","Enter Length")
width=inputbox("Please Enter Rectangle Width","*** Rectangle Calculator ***","Enter Width")
msgbox "Rectangle Length Is " &length & vbcr & "Rectangle Width Is "&width & vbcr & "Your Rectangle Area IS " &length*width ,vbinformation,"*** Rectangle Calculator ***"