CS 101 Spring 2005

Assignment 3 ( 50 Points )

Due : Mon. Mar 7th  2005

 

 

Read Chapter 4 in Schneider and solve all even number problems from 1 to 20 (i.e 2,4,….20) in Exercise 4.2 on page 173.

 

For example if you want to determine the output of the following  code:

 

Private Sub cmdDisplay_Click()

 

       Dim num as Single

        num = 7

        Call AddTwo(num)

        picOutput.print num

 

 End Sub

 

 Private Sub AddTwo(num as Single)

          num = num + 2

 End Sub

 

I expect you turn in your Solution like this:

 

 

Turn in your written assignment in class on March 7th ( You don’t need to type in your assignment, just write on paper and submit it )

 

Tips:

·        Use Odd numbered exercises for practice

·        If you are not sure of your output you can type in your program in VB 6 and check your output

·        Make sure that you turn in your assignment as shown in the example above

·        Attend labs to get help