Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //jon elliott
- #include <iostream>
- #include <limits>
- //#include <iomapnip>
- using namespace std;
- //double stock();
- double orders();
- int stock = 0;
- int ordered = 0;
- double ship = 10.00;
- using namespace std;
- int main()
- {
- int mainMenu = 0;
- while (mainMenu != 4) {
- cout << "What would you like to do? \n";
- cout << "1. See number of spools ordered. \n";
- cout << "2. See number of spools in stock. \n";
- cout << "3. See any special shipping and handling instructions. \n";
- cout << "4. Quit \n";
- cin >> mainMenu;
- if (mainMenu = 1)
- orders();
- if (mainMenu = 2)
- cout << "There are: " << stock << " sin stock.";
- if (mainMenu > 4 || mainMenu < 1)
- cout << "Please enter a positive integer for selection.\n";
- }
- }
- double orders()
- {
- if (ordered > stock)
- cout << "There are: " << (ordered - stock) << "spools on backorder\n";
- if (stock > ordered)
- cout << "there are: " << stock << "in stock\n";
- cout << "The sales price of what is ready to ship is: "<< "$" << (100 * stock)"\n";
- cout << "The shipping cost of ready to ship spools is: " << (ship * stock) <<"\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement