Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- struct product
- {
- char nameProduct[40];
- char category[40];
- int inventory;
- float price;
- };
- int main()
- {
- student s;
- cout << "Enter information," << endl;
- cout << "Enter name: ";
- cin >> s.nameProduct;
- cout << "Please enter the product category: ";
- cin >> s.category;
- cout << "Please enter the number of this item left in stock: ";
- cin >> s.inventory;
- cout << "Please enter the price of this item: ";
- cin >> s.price;
- cout << "Displaying Information," << endl;
- cout << "Product name: " << s.nameProduct << endl;
- cout << "Product Category: " << s.name << endl;
- cout << "Number of items in stock: " << s.inventory << endl;
- cout << "Price: " << s.price << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement