| Chapter 3- Data Types and Operators | Boolean Expressions Page 2 3 4 |
| The If Statement Page 2 3 4 5 6 7 8 9 | |
| Arithmetic Operations Page 2 3 4 5 6 | Boolean Operators and Nested If Statements Page 2 3 4 5 6 7 |
| Events and Sequential Processing Page 2 3 4 5 | More Examples Page 2 3 4 5 6 7 8 9 10 11 12 |
| Datatypes and Conversions Page 2 3 4 5 6 7 | Using Check Box and Option Controls Page 2 3 4 5 6 7 8 9 10 |
| Variable Declarations - Local and Global Page 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Exercises Page 2 3 4 5 6 7 8 |
| Chapter 4- Selection Statements | Review Questions |
| Introduction | |
4-6: More on Nested If Statements
Exercise 4-5: Zeller's Algorithm
Zeller's Congruence allows us to compute the day of the week that a given date corresponds to. For example, given a date such as 21 Jan 1937 the program will compute that the day of the week is Thursday. In fact Visual Basic already has a built-in function to do this task for us, the WeekDay function, so we are "re-inventing the wheel" so to speak - but lets do it anyway for practice.

The Zeller algorithm has the following steps, assuming a date dd Month yyyy is entered:
The figure shows the user interface. Notice that we calculate the day of the week by both Zeller's algorithm and the built-in Visual Basic function, as a means of double checking ourselves.