/* Name: Dave Trivino Course: COP 3223 Section: 1 Assignment Title: Lemonade Date: 9-15-03 Brief Description: This program will determine the price for a pitcher of lemonade. */ #include #define LEMONS_PER_PITCHER 12.0 #define SPOONS_PER_BAG 1000.0 #define SPOONS_PER_PITCHER 50.0 int main(void) { float cost_of_lemon; float cost_of_sugarbag, cost_of_lemons, pitcher_of_sugar, cost_of_pitcher, cost_of_spoon; // User input goes through here printf("Enter the cost of a lemon in cents.\n"); scanf("%f", &cost_of_lemon); printf("Enter the cost of a bag of sugar in dollars.\n"); scanf("%f", &cost_of_sugarbag); // Calculates cost of lemons in a pitcher and cost of spoonfuls of sugar cost_of_spoon = cost_of_sugarbag/SPOONS_PER_BAG; cost_of_lemons = LEMONS_PER_PITCHER * (cost_of_lemon/100); pitcher_of_sugar = SPOONS_PER_PITCHER*cost_of_spoon; cost_of_pitcher = cost_of_lemons + pitcher_of_sugar; // Outputs price of pitcher printf("The cost of a pitcher of lemonade is $%2.2f.\n", cost_of_pitcher); return 0; }