is a good idea to check that it is complete and logical. This can be done by using actual values on the algorithm. There are two ways to do this: DRY–RUN TESTING and TRACE TABLES. DRY–RUN TESTING
Dry-run testing is also known as desk
checking. This is when you substitute values for the variables and follow the instructions in the algorithm step by step to arrive at a solution. A dry-run test will tell you if there are any
logic errors in your algorithm.
DRY–RUN TESTING TRACE TABLES
Trace table is a very useful tool which
allows you to see the state of your algorithm with as much detail as you wish. They are tables that track each variable as
a column for each variable and one row per pass, so the number of rows depends on
how many times the calculations is
carried out. Explanation The first row contains the initialised values The second row contains the values of Number1 after 3 is added to it and the value of Number2 after 2 is added to it. Number1= 3 and Number2 = 3. The third row contains Number1= 6 and Number2 = 5. Fourth row contains Number1= 9 and Number2 = 7 . Fifth row contains Number1= 12 and Number2 = 9. The loop stops after number reaches 12.