Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- enum bottle_state {
- FULL,
- HALF,
- TOTAL,
- NUM_ELEMENTS
- };
- int main(){
- const double LITERS_PER_GALLON = 3.785;
- const double POUNDS_PER_GALLON = 8.348;
- const double POUNDS_PER_CONTAINER = 0.5 / 16;
- const int CASE_PER_PALLET = 80;
- const int BOTTLES_PER_CASE = 24;
- // create an array holding the number of full and half bottles that the user would like
- int *bottles = new int[bottle_state::NUM_ELEMENTS];
- std::cout << "Number of full pallets: ";
- std::cin >> bottles[FULL];
- std::cout << "Number of half pallets: ";
- std::cin >> bottles[HALF];
- bottles[TOTAL] = bottles[HALF] + bottles[FULL];
- // servings count is equal to the number of bottles
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement