Please send questions to st10@humboldt.edu .
/*--------------------------------------------------
created by st10 at Mon Apr 30 10:58:04 PDT 2007
--------------------------------------------------*/
#include <iostream>
#include <cmath>
using namespace std;


/*--------------------------------------------------
 Contract: swap : int& int& -> void
 Purpose: swap the values in the arguments corresponding
         to <val1> and <val2>, so that after this call
         what was <val1>'s value is not <val2>'s value,
         and what was <val2>'s value is now <val1>'s value

 Examples: if mine == 6 and yours == 27, then after
          swap(mine, yours)
          then mine == 27 and yours == 6
--------------------------------------------------*/
void swap(int& val1, int& val2)
{
    int temp;

    temp = val1;
    val1 = val2;
    val2 = temp;
}