Order Placing 1
Order Placing 1
#include <vector>
#include <string>
#include <map> // For storing item prices
struct Order {
string item;
int quantity;
double price;
};
int main() {
// Define prices for items
map<string, double> itemPrices = {
{"apple", 1.00},
{"banana", 0.50},
{"orange", 0.75}
// Add more items and prices as needed
};
char choice;
do {
Order newOrder;
cout << "Enter item name: ";
cin >> newOrder.item;
cout << "Do you want to place another order? (Y/N): ";
cin >> choice;
} while (choice == 'Y' || choice == 'y');
return 0;
}