To Activities

IT 121 -- Activity A14

More Algorithms and Macros

Turn in: An Excel File with your variable trace and output. Test each macro to make sure you have the correct answer. Work in groups of two or three.

Goal:   Write basic algorithms and macros.

  1. Write pseudocode for an algorithm that sorts three items similar to the example that sorts four items. Implement your pseudocode as an Excel Macro algorithm.

  2. Write pseudocode for an algorithm that inputs a year, then outputs if it is a leap year according to the Gregorian calender. Recall that years such as 1700, 1800 and 1900 are not leap years if they are divisible by 100 but not by 400. Years such as 1200, 1600 and 2000 are divisible by 400 so they are leap years. Implement your pseudocode as an Excel Macro algorithm.

    Hint: there are four cases to consider.