Private Sub CmdDisplay_Click()
Dim i as Integer, j as Integer
For i = 0 to 6 step 2
For j = 0 to 3
PicBox.Print i + 3 * j - 1; " ";
Next J
PicBox.Print
Next i
End Sub
Private Sub CmdDisplay_Click()
Dim i As Integer
For i = 1 to 7 step 1
PicOutput.Print i; 2 ^ i
End Sub
Private Sub_CmdDisplay_Click()
Dim num As Integer
Let num = 1
Do While num <= 25
PicOutput.Print num
Let num = num + 4
Loop
End Sub
According to Plato, a man should marry a woman whose age is half his age plus seven years. Write a program that requests a man's age as input and give the ideal age of his wife.
Use the built-in InputBox( ) function to request (and receive) the man's age.
Please be sure to construct a user-defined function to carry out the calculation for the ideal age of the man's wife.
Do you have any questions, comments or suggestions? If so, please e-mail them to me at jcorlis@luc.edu.
To return to the COMP 125 web site, click here.
To go to my home page, click here.
To go to the home page of Loyola University Chicago, click here.
Jack Corliss
Mathematical and Computer Sciences
Loyola University Chicago
Revised: 3 May 1999