// Arup Guha
// 8/30/2011 - COP 3223 Tappen's Section
// Sample Program using =

#include <stdio.h>

int main() {

    int mymoney, yourmoney;

    // Show what happens with uninitialized variables.
    printf("I have %d, you have %d.\n", mymoney, yourmoney);

    // Initialize the two variables.
    mymoney = 21;
    yourmoney = 100000;

    // This printf reflects the initialization.
    printf("Now, I have %d, you have %d.\n", mymoney, yourmoney);

    // I bought girl scout cookies for $4.
    mymoney = mymoney - 4;

    // Print out the status of money, for both of us.
    printf("After buying cookies, I have %d, you have %d.\n", mymoney, yourmoney);

    // This is how you swap two variables. Notice the use of the
    // third variable. This is a great deal for me!
    int pettycash = mymoney;
    mymoney = yourmoney;
    yourmoney = pettycash;

    // Shows the successful swap.
    printf("After trading money, I have %d, you have %d.\n", mymoney, yourmoney);

    return 0;
}
