Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.23 KB | None | 0 0
  1. //jon elliott
  2. #include <iostream>
  3. #include <limits>
  4. //#include <iomapnip>
  5.  
  6. using namespace std;
  7. //double stock();
  8. double orders();
  9. int stock = 0;
  10. int ordered = 0;
  11. double ship = 10.00;
  12. using namespace std;
  13.  
  14. int main()
  15. {
  16.     int mainMenu = 0;
  17.  
  18.     while (mainMenu != 4) {
  19.         cout << "What would you like to do? \n";
  20.         cout << "1. See number of spools ordered. \n";
  21.         cout << "2. See number of spools in stock. \n";
  22.         cout << "3. See any special shipping and handling instructions. \n";
  23.         cout << "4. Quit \n";
  24.         cin >> mainMenu;
  25.         if (mainMenu = 1)
  26.             orders();
  27.         if (mainMenu = 2)
  28.             cout << "There are:  " << stock << "  sin stock.";
  29.         if (mainMenu > 4 || mainMenu < 1)
  30.             cout << "Please enter a positive integer for selection.\n";
  31.     }
  32. }
  33.  
  34. double orders()
  35. {
  36.     if (ordered > stock)
  37.         cout << "There are:  " << (ordered - stock) << "spools on backorder\n";
  38.     if (stock > ordered)
  39.         cout << "there are:  " << stock  << "in stock\n";
  40.         cout << "The sales price of what is ready to ship is: "<< "$" << (100 * stock)"\n";
  41.         cout << "The shipping cost of ready to ship spools is:  " << (ship * stock) <<"\n";
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement