Tracing Algorithms: Sample Answers 1. When 18 is entered, the algorithm will print 4. The algorithm computes the remainder when n is divided by 7. 2. When 5 is entered, the algorithm prints 35. This algorithm prints the sum of the squares of odd numbers from 1 to n.