// Arup Guha
// Our beer and nachos program!
// Written in class on 8/24/2011

#include <stdio.h>

int main() {

    printf("Welcome to the COP 3223 Beer & Nachos Restaurant!!!\n");

    // Set up our variables. These may either be initialized or uninitialized.
    double beer_price=0, nachos_price=0;
    int num_beers, num_nachos;

    // Set each variable to an appropriate value.
    beer_price = 3.50;
    nachos_price = 5.99;
    num_beers = 3;
    num_nachos = 2;

    // Print out the cost of one beer and one order of nachos.
    printf("One beer costs $%.2lf, nachos cost $%.2lf\n", beer_price,
                                                        nachos_price);

    // Calculate the price of our order here.
    double reg_price = num_beers*beer_price + num_nachos*nachos_price;

    // Print this price out.
    printf("You would usually spend $%.2lf", reg_price);

    // Discount the beer by one dollar.
    beer_price = beer_price - 1;

    // Now, we can see that the price of a beer has changed, but not the nachos.
    printf("One beer costs $%.2lf, nachos cost $%.2lf\n", beer_price,
                                                        nachos_price);

    // Recalculate the price of our order. Notice that our expression is the SAME,
    // but the end value is different, since beer_price has changed.
    double new_price = num_beers*beer_price + num_nachos*nachos_price;

    // Print out the new sale price of the order.
    printf("On sale you spend $%.2lf", new_price);

    return 0;
}
