...Pre-Conditions
if(Set.Not_Empty()) //Checks if numbers are left in the set
Next_Number = Set.Get_Next();//Gets next number in set to Next_Number
Sum = Sum + Next_Number; //This step adds the following number to Sum
...Post-Conditions
As we can see this code will now work for any size set, thus we can solve the general problem without making adjustments to code for different length sets.